Example #1
0
        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);
        }
Example #2
0
        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()}");
        }