public Task <UpdateAccountNameResult> ExecuteAsync(UpdateAccountNameParameters parameters, CancellationToken cancellationToken = default) { if (parameters is null) { throw new System.ArgumentNullException(nameof(parameters)); } return(InvokeExecuteAsync(parameters, cancellationToken)); }
public Task <ActionResult> UpdateAccountNameAsync(UpdateAccountNameParameters parameters, [FromServices] IUpdateAccountNameHandler handler, CancellationToken cancellationToken) { if (handler is null) { throw new ArgumentNullException(nameof(handler)); } return(InvokeUpdateAccountNameAsync(parameters, handler, cancellationToken)); }
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously private async Task <UpdateAccountNameResult> InvokeExecuteAsync(UpdateAccountNameParameters parameters, CancellationToken cancellationToken) #pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously { throw new System.NotImplementedException(); }
public Task <UpdateAccountNameResult> ExecuteAsync(UpdateAccountNameParameters parameters, CancellationToken cancellationToken = default) { return(Task.FromResult(UpdateAccountNameResult.Ok("Hallo world"))); }
private static async Task <ActionResult> InvokeUpdateAccountNameAsync(UpdateAccountNameParameters parameters, IUpdateAccountNameHandler handler, CancellationToken cancellationToken) { return(await handler.ExecuteAsync(parameters, cancellationToken)); }
public async Task <UpdateAccountNameResult> InvokeExecuteAsync(UpdateAccountNameParameters parameters, CancellationToken cancellationToken = default) { return(await Task.FromResult(UpdateAccountNameResult.Ok("Now the account name is updated"))); }