public static QueryReferenceField FromValue(string value) { foreach (QueryReferenceField queryReferenceField in QueryReferenceField.Values()) { if (queryReferenceField.Value().Equals(value)) { return(queryReferenceField); } } throw new ArgumentException(value.ToString()); }
public static List <QueryReferenceField> Values() { QueryReferenceField queryReferenceField = new QueryReferenceField(); List <QueryReferenceField> queryReferenceFieldList = new List <QueryReferenceField>(); foreach (PropertyInfo property in typeof(QueryReferenceField).GetProperties()) { queryReferenceFieldList.Add((QueryReferenceField)property.GetValue((object)queryReferenceField, (object[])null)); } return(queryReferenceFieldList); }