private void DoWork(object state) { logger.LogInformation("DoWork has been called."); IRequestContractData requestContractData = new RequestContractData { Id = ++counter, CorrelationId = Guid.NewGuid(), Created = DateTimeOffset.Now }; sendDataService.PostAsync(requestContractData); }
private async void DoWork(object state) { logger.LogInformation("DoWork has been called."); IRequestContractData requestContractData = new RequestContractData { Id = ++counter, CorrelationId = Guid.NewGuid(), Created = DateTimeOffset.Now }; var responseContractData = await sendDataService.PostAsync(requestContractData); logger.LogInformation($"After a roundtrip out on the queue we received: {responseContractData.AsString()}"); }