public Task <ActionResult> PostUserAsync(PostUserParameters parameters, [FromServices] IPostUserHandler handler, CancellationToken cancellationToken) { if (handler is null) { throw new ArgumentNullException(nameof(handler)); } return(InvokePostUserAsync(parameters, handler, cancellationToken)); }
private static async Task <ActionResult> InvokePostUserAsync(PostUserParameters parameters, IPostUserHandler handler, CancellationToken cancellationToken) { return(await handler.ExecuteAsync(parameters, cancellationToken)); }