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)); }
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); }