public static QueryServiceResourceField FromValue(string value)
 {
     foreach (QueryServiceResourceField serviceResourceField in QueryServiceResourceField.Values())
     {
         if (serviceResourceField.Value().Equals(value))
         {
             return(serviceResourceField);
         }
     }
     throw new ArgumentException(value.ToString());
 }
        public static List <QueryServiceResourceField> Values()
        {
            QueryServiceResourceField        serviceResourceField     = new QueryServiceResourceField();
            List <QueryServiceResourceField> serviceResourceFieldList = new List <QueryServiceResourceField>();

            foreach (FieldInfo field in serviceResourceField.GetType().GetFields())
            {
                serviceResourceFieldList.Add((QueryServiceResourceField)field.GetValue((object)serviceResourceField));
            }
            return(serviceResourceFieldList);
        }