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