Exemple #1
0
 public static QueryDiskField FromValue(string value)
 {
     foreach (QueryDiskField queryDiskField in QueryDiskField.Values())
     {
         if (queryDiskField.Value().Equals(value))
         {
             return(queryDiskField);
         }
     }
     throw new ArgumentException(value.ToString());
 }
Exemple #2
0
        public static List <QueryDiskField> Values()
        {
            QueryDiskField        queryDiskField     = new QueryDiskField();
            List <QueryDiskField> queryDiskFieldList = new List <QueryDiskField>();

            foreach (FieldInfo field in queryDiskField.GetType().GetFields())
            {
                queryDiskFieldList.Add((QueryDiskField)field.GetValue((object)queryDiskField));
            }
            return(queryDiskFieldList);
        }