示例#1
0
        public async Task <ActionResult> AddEvent([FromBody] SiddhiDTO Event)
        {
            TemperatureEvent temp = new TemperatureEvent(Event.Event);

            Console.WriteLine("Received siddhi");
            await _notifyService.NotifyClient(temp);

            return(Ok());
        }
示例#2
0
        public async Task SendCEP(RoadAndAirTempData data)
        {
            SiddhiDTO dto = new SiddhiDTO();

            dto.Event = new RoadAndAirTempDTO(data);

            HttpResponseMessage response = await _unitOfWork.HttpClient.PostAsync(_unitOfWork.SiddhiLocation + _siddhiEndpoint,
                                                                                  new StringContent(JsonSerializer.Serialize(dto), Encoding.UTF8, "application/json"));

            await response.Content.ReadAsStreamAsync();
        }