public Task <ActionResult> GetRouteWithDashAsync([FromServices] IGetRouteWithDashHandler handler, CancellationToken cancellationToken) { if (handler is null) { throw new ArgumentNullException(nameof(handler)); } return(InvokeGetRouteWithDashAsync(handler, cancellationToken)); }
private static async Task <ActionResult> InvokeGetRouteWithDashAsync([FromServices] IGetRouteWithDashHandler handler, CancellationToken cancellationToken) { return(await handler.ExecuteAsync(cancellationToken)); }