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

            foreach (FieldInfo field in layer4ProtocolType.GetType().GetFields())
            {
                layer4ProtocolTypeList.Add((Layer4ProtocolType)field.GetValue((object)layer4ProtocolType));
            }
            return(layer4ProtocolTypeList);
        }