示例#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
 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 + "\"}");
 }