Exemplo n.º 1
0
 public static QueryServiceField FromValue(string value)
 {
     foreach (QueryServiceField queryServiceField in QueryServiceField.Values())
     {
         if (queryServiceField.Value().Equals(value))
         {
             return(queryServiceField);
         }
     }
     throw new ArgumentException(value.ToString());
 }
Exemplo n.º 2
0
        public static List <QueryServiceField> Values()
        {
            QueryServiceField        queryServiceField     = new QueryServiceField();
            List <QueryServiceField> queryServiceFieldList = new List <QueryServiceField>();

            foreach (FieldInfo field in queryServiceField.GetType().GetFields())
            {
                queryServiceFieldList.Add((QueryServiceField)field.GetValue((object)queryServiceField));
            }
            return(queryServiceFieldList);
        }