Whens() public method

public Whens ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task
Example #1
0
        static async Task ExecuteWhens(EndpointRunner endpoint, CancellationTokenSource cts)
        {
            var token = cts.Token;

            try
            {
                await endpoint.Whens(token).ConfigureAwait(false);
            }
            catch (Exception ex)
            {
                cts.Cancel();
                throw new ScenarioException("Whens failed to execute", ex);
            }
        }
Example #2
0
        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;
            }
        }
Example #3
0
 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;
     }
 }