private List <InboundRule> GetInboundRules(Database db) { Log.Info(this, db, "Start GetInboundRules."); var cache = RulesCacheManager.GetCache(db); var inboundRules = cache.GetInboundRules(); Log.Info(this, db, "Stop GetInboundRules."); if (inboundRules != null) { Log.Info(this, db, "inboundRules!=null"); Log.Info(this, db, "inboundRules.Any()=={0}", inboundRules.Any()); if (inboundRules.Any()) { Log.Info(this, db, "inboundRules.Count()=={0}", inboundRules.Count); } return(inboundRules); } else { Log.Info(this, db, "inboundRules==null"); } Log.Info(this, db, "Initializing Inbound Rules."); using (new SecurityDisabler()) { var rulesEngine = new RulesEngine(db); inboundRules = rulesEngine.GetCachedInboundRules(); } return(inboundRules); }
private List <InboundRule> GetInboundRules(Database db) { var cache = RulesCacheManager.GetCache(db); var inboundRules = cache.GetInboundRules(); if (inboundRules != null) { return(inboundRules); } Log.Info(this, db, "Initializing Inbound Rules."); using (new SecurityDisabler()) { var rulesEngine = new RulesEngine(db); inboundRules = rulesEngine.GetCachedInboundRules(); } return(inboundRules); }
private RulesCache GetRulesCache() { return(RulesCacheManager.GetCache(db)); }