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