internal static IList <ValidationRule> GetApplicableValidationRules(string cmdletFullName, IList <string> parameters, ValidationRuleSkus applicableSku)
        {
            IList <RoleEntryValidationRuleTuple> applicableRules = RBACValidationRulesList.Instance.GetApplicableRules(cmdletFullName, parameters, applicableSku);
            List <ValidationRule> list = new List <ValidationRule>(applicableRules.Count);

            foreach (RoleEntryValidationRuleTuple roleEntryValidationRuleTuple in applicableRules)
            {
                list.Add(ValidationRuleFactory.Create(roleEntryValidationRuleTuple.RuleDefinition, roleEntryValidationRuleTuple.MatchingRoleEntry));
            }
            return(list);
        }
        internal static List <ValidationRule> GetValidationRulesByFeature(string feature)
        {
            if (string.IsNullOrEmpty(feature))
            {
                throw new ArgumentNullException("feature");
            }
            IList <ValidationRuleDefinition> applicableRules = RBACValidationRulesList.Instance.GetApplicableRules(feature);
            List <ValidationRule>            list            = new List <ValidationRule>(applicableRules.Count);

            foreach (ValidationRuleDefinition definition in applicableRules)
            {
                list.Add(ValidationRuleFactory.Create(definition, null));
            }
            return(list);
        }