Esempio n. 1
0
 public static QueryAclRuleField FromValue(string value)
 {
     foreach (QueryAclRuleField queryAclRuleField in QueryAclRuleField.Values())
     {
         if (queryAclRuleField.Value().Equals(value))
         {
             return(queryAclRuleField);
         }
     }
     throw new ArgumentException(value.ToString());
 }
Esempio n. 2
0
        public static List <QueryAclRuleField> Values()
        {
            QueryAclRuleField        queryAclRuleField     = new QueryAclRuleField();
            List <QueryAclRuleField> queryAclRuleFieldList = new List <QueryAclRuleField>();

            foreach (FieldInfo field in queryAclRuleField.GetType().GetFields())
            {
                queryAclRuleFieldList.Add((QueryAclRuleField)field.GetValue((object)queryAclRuleField));
            }
            return(queryAclRuleFieldList);
        }