Beispiel #1
0
        public static bool AddRuleset(Session session, string deviceName)
        {
            if (Rulesets.FirstOrDefault(x => x.RulesetName.Equals(session.SessionName)) == null)
            {
                var newRuleset = new Ruleset(session, deviceName, Rulesets.Count);

                Rulesets.Add(newRuleset);
                if (RulesetsTableMgr.AddRuleset(newRuleset))
                {
                    Logger.AddLogEntry(LogCategory.INFO, "Added Ruleset: " + session.SessionName);
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            return(false);
        }
Beispiel #2
0
 public static Ruleset GetRuleset(string rulesetName)
 {
     return(Rulesets.FirstOrDefault(x => x.RulesetName.Equals(rulesetName)));
 }