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

            foreach (FieldInfo field in fenceModeValuesType.GetType().GetFields())
            {
                fenceModeValuesTypeList.Add((FenceModeValuesType)field.GetValue((object)fenceModeValuesType));
            }
            return(fenceModeValuesTypeList);
        }