public static GatewayEnums FromValue(string value)
 {
     foreach (GatewayEnums gatewayEnums in GatewayEnums.Values())
     {
         if (gatewayEnums.Value().Equals(value))
         {
             return(gatewayEnums);
         }
     }
     throw new ArgumentException(value.ToString());
 }
        public static List <GatewayEnums> Values()
        {
            GatewayEnums        gatewayEnums     = new GatewayEnums();
            List <GatewayEnums> gatewayEnumsList = new List <GatewayEnums>();

            foreach (FieldInfo field in gatewayEnums.GetType().GetFields())
            {
                gatewayEnumsList.Add((GatewayEnums)field.GetValue((object)gatewayEnums));
            }
            return(gatewayEnumsList);
        }