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