示例#1
0
        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));
        }
示例#2
0
        public Task <UpdateMyTestGenderResult> ExecuteAsync(UpdateMyTestGenderParameters parameters, CancellationToken cancellationToken = default)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            return(InvokeExecuteAsync(parameters, cancellationToken));
        }
示例#3
0
 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")));
 }
示例#5
0
 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();
        }