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

            foreach (FieldInfo field in firewallDirectionType.GetType().GetFields())
            {
                firewallDirectionTypeList.Add((FirewallDirectionType)field.GetValue((object)firewallDirectionType));
            }
            return(firewallDirectionTypeList);
        }