public async Task <CancelResponse> LongRunningService(LongRunningFormRequest request, CancellationToken cancel)
        {
            await Task.FromResult(cancel.WaitHandle.WaitOne(TimeSpan.FromSeconds(request.TimeoutSeconds)));

            return(new CancelResponse {
                TokenEcho = request.Token, WasCancelled = cancel.IsCancellationRequested
            });
        }
		public void ExpectCancellableRouteIsWiredUpAndResolvedCorrectly(
			string verb, RouteRegistrar registrar, Guid token, CancellationTokenSource cancel)
		{
			var browser = AsyncCancellationBrowserFactory.CreateBrowserWithCancellationToken(registrar, cancel.Token);
			var request = new LongRunningFormRequest(AsyncSafetyTimeoutSeconds + 1, token);

			cancel.CancelAfter(TimeSpan.FromMilliseconds(20));
			var response = browser.SendFormRequest<CancelResponse>(verb, "/cancel/long-running", request);

			response.TokenEcho.Should().Be(token);
			response.WasCancelled.Should().BeTrue();
		}
		public async Task<CancelResponse> LongRunningService(LongRunningFormRequest request, CancellationToken cancel)
		{
			await Task.FromResult(cancel.WaitHandle.WaitOne(TimeSpan.FromSeconds(request.TimeoutSeconds)));
			return new CancelResponse { TokenEcho = request.Token, WasCancelled = cancel.IsCancellationRequested };
		}