/// <summary> /// Получить коллекцию правил /// </summary> /// <param name="Rules"></param> /// <param name="name"></param> /// <returns></returns> public RulesCollection GetRules(string rules, typeRules type) { RulesCollection rc = new RulesCollection(type); rc.LoadString(rules); return(rc); }
public List <RulesCollection> SelectAccessRules(string rules) { List <RulesCollection> listAllRules = new List <RulesCollection>(); if ((rules == null) | (rules.Trim() == "")) { return(null); } string[] array_type = rules.Split(','); foreach (string st in array_type) { string[] array_section = st.Split(':'); if (array_section[0] != "") { typeRules tr = (typeRules)Enum.Parse(typeof(typeRules), array_section[0].Trim()); RulesCollection rc = new RulesCollection(tr); rc.LoadString(rules); listAllRules.Add(rc); } } return(listAllRules); }