public Task <ActionResult> UpdateMyTestGenderAsync(UpdateMyTestGenderParameters parameters, [FromServices] IUpdateMyTestGenderHandler handler, CancellationToken cancellationToken) { if (handler is null) { throw new ArgumentNullException(nameof(handler)); } return(InvokeUpdateMyTestGenderAsync(parameters, handler, cancellationToken)); }
public Task <UpdateMyTestGenderResult> ExecuteAsync(UpdateMyTestGenderParameters parameters, CancellationToken cancellationToken = default) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } return(InvokeExecuteAsync(parameters, cancellationToken)); }
private static async Task <ActionResult> InvokeUpdateMyTestGenderAsync(UpdateMyTestGenderParameters parameters, IUpdateMyTestGenderHandler handler, CancellationToken cancellationToken) { return(await handler.ExecuteAsync(parameters, cancellationToken)); }
public Task <UpdateMyTestGenderResult> ExecuteAsync(UpdateMyTestGenderParameters parameters, CancellationToken cancellationToken = default) { return(Task.FromResult(UpdateMyTestGenderResult.Ok("Hallo world"))); }
private async Task <UpdateMyTestGenderResult> InvokeExecuteAsync(UpdateMyTestGenderParameters 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 <UpdateMyTestGenderResult> InvokeExecuteAsync(UpdateMyTestGenderParameters parameters, CancellationToken cancellationToken) #pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously { throw new System.NotImplementedException(); }