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