Beispiel #1
0
 public static QueryHostField FromValue(string value)
 {
     foreach (QueryHostField queryHostField in QueryHostField.Values())
     {
         if (queryHostField.Value().Equals(value))
         {
             return(queryHostField);
         }
     }
     throw new ArgumentException(value.ToString());
 }
Beispiel #2
0
        public static List <QueryHostField> Values()
        {
            QueryHostField        queryHostField     = new QueryHostField();
            List <QueryHostField> queryHostFieldList = new List <QueryHostField>();

            foreach (FieldInfo field in queryHostField.GetType().GetFields())
            {
                queryHostFieldList.Add((QueryHostField)field.GetValue((object)queryHostField));
            }
            return(queryHostFieldList);
        }