Exemplo n.º 1
0
        public void WhenATempRequestIsAddedToTheQueueWithJobIdentifier(string jobIdentifier, Table reports)
        {
            Assert.IsTrue(!string.IsNullOrEmpty(jobIdentifier));

            var requestHelper = reports.CreateSet<RequestHelper>();

            var allReportRequests = ExtractReportRequests(requestHelper);

            var requestMessage = new ExecuteBatchReportRequest
            {
                jobIdentifier = jobIdentifier,
                reports = allReportRequests
            };

            DeleteAnyExistingReportsForThisJobIdentifier(jobIdentifier);

            // synchronous Publish will wait until confirmed publish or timeout exception thrown
            OutboundServiceBus.Publish(requestMessage);
        }
Exemplo n.º 2
0
 public static void Publish(ExecuteBatchReportRequest request)
 {
     Requests.Add(request);
     
     Task.WaitAll(requestPublisher.PublishAsync(request, null));
 }