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)); }
private void SendAlert(dynamic device, Rule match) { Console.WriteLine("Blacklist rule match: " + match.Name); Console.WriteLine("device: " + device); alertEventClient.SendMessage("{\"MessageType\":\"BlacklistMatch\",\"RuleId\":\"" + match.Id + "\",\"Mac\":\"" + device.DeviceMacAddress + "\",\"Ip\":\"" + device.DeviceIpAddress + "\",\"Name\":\"" + device.DeviceName + "\"}"); }