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