public static bool AddArea(ProtectionArea area)
        {
            if (Config.Areas.Any(a => a.Name.Equals(area.Name, StringComparison.InvariantCultureIgnoreCase)))
                return false;

            Config.Areas.Add(area);
            return true;
        }
Ejemplo n.º 2
0
        public static bool RemoveArea(ProtectionArea area)
        {
            if (!Config.Areas.Any(a => a.Name.Equals(area.Name, StringComparison.InvariantCultureIgnoreCase)))
            {
                return(false);
            }

            Config.Areas.RemoveAll(a => a.Name.Equals(area.Name, StringComparison.InvariantCultureIgnoreCase));
            return(true);
        }