示例#1
0
        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);
        }
示例#2
0
 public static QueryAllocatedExternalAddressField FromValue(
     string value)
 {
     foreach (QueryAllocatedExternalAddressField externalAddressField in QueryAllocatedExternalAddressField.Values())
     {
         if (externalAddressField.Value().Equals(value))
         {
             return(externalAddressField);
         }
     }
     throw new ArgumentException(value.ToString());
 }