예제 #1
0
        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));
        }
예제 #3
0
#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();
        }
예제 #4
0
 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));
 }
예제 #6
0
 public async Task <UpdateAccountNameResult> InvokeExecuteAsync(UpdateAccountNameParameters parameters, CancellationToken cancellationToken = default)
 {
     return(await Task.FromResult(UpdateAccountNameResult.Ok("Now the account name is updated")));
 }