public void MaxSelectedOptionsRuleCheck(
            ConfigurationItem configurationItem, MaxSelectedOptionsRule rule, out string error)
        {
            error = string.Empty;
            var selectedCount = configurationItem.ConfigurationItemOptions.Count(o => o.IsSelected);

            if (selectedCount > rule.Count)
            {
                error = $"{configurationItem.Name} requires at least {rule.Count} option(s)";
            }
        }
예제 #2
0
        public void MaxSelectedOptionsRuleCheck(
            ConfigurationItem configurationItem, MaxSelectedOptionsRule rule, out string error)
        {
            error = string.Empty;
            var selectedCount = configurationItem.ConfigurationItemOptions.Count(o => o.IsSelected);

            if (selectedCount > rule.Count)
            {
                error = $"{configurationItem.Name} requires at least {rule.Count} option(s)";
            }
        }