public Task <ActionResult> UpdateUserByIdAsync(UpdateUserByIdParameters parameters, [FromServices] IUpdateUserByIdHandler handler, CancellationToken cancellationToken) { if (handler is null) { throw new ArgumentNullException(nameof(handler)); } return(InvokeUpdateUserByIdAsync(parameters, handler, cancellationToken)); }
public Task <UpdateUserByIdResult> ExecuteAsync(UpdateUserByIdParameters parameters, CancellationToken cancellationToken = default) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } return(InvokeExecuteAsync(parameters, cancellationToken)); }
private static async Task <ActionResult> InvokeUpdateUserByIdAsync(UpdateUserByIdParameters parameters, IUpdateUserByIdHandler handler, CancellationToken cancellationToken) { return(await handler.ExecuteAsync(parameters, cancellationToken)); }
public Task <UpdateUserByIdResult> ExecuteAsync(UpdateUserByIdParameters parameters, CancellationToken cancellationToken = default) { return(Task.FromResult(UpdateUserByIdResult.Ok("Hallo world"))); }
private async Task <UpdateUserByIdResult> InvokeExecuteAsync(UpdateUserByIdParameters parameters, CancellationToken cancellationToken) { return(await Task.FromResult("We are now updated.")); }
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously private async Task <UpdateUserByIdResult> InvokeExecuteAsync(UpdateUserByIdParameters parameters, CancellationToken cancellationToken) #pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously { throw new System.NotImplementedException(); }