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