public static async Task HandleCheckHttpEndpointAsync( [QueueTrigger("commands")] string json, TraceWriter log, [Inject] IHttpMonitorExecutor executor, [Inject] IHttpMonitorCheckRepository repository, [Inject] IHttpMonitorCheckedPublisher publisher) { var check = JsonConvert.DeserializeObject <CheckHttpEndpoint>(json, Constants.JsonSerializerSettings); var httpMonitorCheck = await executor.CheckHttpEndpointAsync(check); await repository.CreateAsync(httpMonitorCheck); var @event = httpMonitorCheck.CreateHttpMonitorChecked(); await publisher.PublishAsync(@event); }
public HttpMonitorExecutorService(IHttpMonitorRepository repository, IHttpMonitorExecutor executor) { _repository = repository; _executor = executor; }