public static QueryCatalogField FromValue(string value) { foreach (QueryCatalogField queryCatalogField in QueryCatalogField.Values()) { if (queryCatalogField.Value().Equals(value)) { return(queryCatalogField); } } throw new ArgumentException(value.ToString()); }
public static List <QueryCatalogField> Values() { QueryCatalogField queryCatalogField = new QueryCatalogField(); List <QueryCatalogField> queryCatalogFieldList = new List <QueryCatalogField>(); foreach (FieldInfo field in queryCatalogField.GetType().GetFields()) { queryCatalogFieldList.Add((QueryCatalogField)field.GetValue((object)queryCatalogField)); } return(queryCatalogFieldList); }