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

            foreach (FieldInfo field in apiDefinitionField.GetType().GetFields())
            {
                apiDefinitionFieldList.Add((QueryAdminApiDefinitionField)field.GetValue((object)apiDefinitionField));
            }
            return(apiDefinitionFieldList);
        }