コード例 #1
0
 protected virtual CommandProcessorResponse <int> DeleteRule(Guid ruleId)
 {
     dal.DeleteRule(ruleId);
     using (var client = new AlertEventClient(configuration)){
         client.SendMessage("{\"MessageType\":\"RuleDeleted\",\"RuleId\":\"" + ruleId + "\"}");
     }
     return(WrapResponse(1));
 }
コード例 #2
0
ファイル: Listener.cs プロジェクト: dongdong-2009/Ajakka
        public Listener(IBlacklist dal, IBlacklistConfiguration blacklistConfiguration)
        {
            if (dal == null)
            {
                throw new ArgumentNullException("dal");
            }
            this.dal = dal;

            if (blacklistConfiguration == null)
            {
                throw new ArgumentNullException("blacklistConfiguration");
            }
            this.blacklistConfiguration = blacklistConfiguration;
            alertEventClient            = new AlertEventClient(blacklistConfiguration);
        }