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