Example #1
0
        public bool ReloadRules(Dictionary <string, string> idEplDictionary)
        {
            return(_wcfCall.Wrap(() =>
            {
                _log.Warn("Received request to reload all rules");

                _bulkRulesManagerMgr.UnloadAll();

                _bulkRulesManagerMgr.LoadAll(idEplDictionary);

                return true;
            }));
        }
Example #2
0
        public bool Add(string id, string epl)
        {
            _log.Debug("Adding rule");

            return(_wcfCall.Wrap(() =>
            {
                if (string.IsNullOrEmpty(epl))
                {
                    throw new ArgumentNullException("epl");
                }
                if (string.IsNullOrEmpty(id))
                {
                    throw new ArgumentNullException("id");
                }

                var logHelper = new LogHelper();
                logHelper.LogRuleDetail(epl, id);

                _log.Debug(id + " > loading rule to NEsper");
                _adapter.Load(id, epl);

                return true;
            }));
        }