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