NServiceBus.AcceptanceTesting.Support.ScenarioRunner.ExecuteWhens C# (CSharp) Method

ExecuteWhens() static private method

static private ExecuteWhens ( EndpointRunner endpoint, CancellationTokenSource cts ) : Task
endpoint EndpointRunner
cts System.Threading.CancellationTokenSource
return Task
        static async Task ExecuteWhens(EndpointRunner endpoint, CancellationTokenSource cts)
        {
            var token = cts.Token;
            try
            {
                await endpoint.Whens(token).ConfigureAwait(false);
            }
            catch (Exception)
            {
                cts.Cancel();
                Console.WriteLine($"Whens for endpoint {endpoint.Name()} failed to execute.");
                throw;
            }
        }

Same methods

ScenarioRunner::ExecuteWhens ( IEnumerable endpoints, CancellationTokenSource cts ) : Task