Esempio n. 1
0
        public Task <ActionResult> UpdateUserByIdAsync(UpdateUserByIdParameters parameters, [FromServices] IUpdateUserByIdHandler handler, CancellationToken cancellationToken)
        {
            if (handler is null)
            {
                throw new ArgumentNullException(nameof(handler));
            }

            return(InvokeUpdateUserByIdAsync(parameters, handler, cancellationToken));
        }
Esempio n. 2
0
        public Task <UpdateUserByIdResult> ExecuteAsync(UpdateUserByIdParameters parameters, CancellationToken cancellationToken = default)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            return(InvokeExecuteAsync(parameters, cancellationToken));
        }
Esempio n. 3
0
 private static async Task <ActionResult> InvokeUpdateUserByIdAsync(UpdateUserByIdParameters parameters, IUpdateUserByIdHandler handler, CancellationToken cancellationToken)
 {
     return(await handler.ExecuteAsync(parameters, cancellationToken));
 }
Esempio n. 4
0
 public Task <UpdateUserByIdResult> ExecuteAsync(UpdateUserByIdParameters parameters, CancellationToken cancellationToken = default)
 {
     return(Task.FromResult(UpdateUserByIdResult.Ok("Hallo world")));
 }
Esempio n. 5
0
 private async Task <UpdateUserByIdResult> InvokeExecuteAsync(UpdateUserByIdParameters parameters, CancellationToken cancellationToken)
 {
     return(await Task.FromResult("We are now updated."));
 }
Esempio n. 6
0
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
        private async Task <UpdateUserByIdResult> InvokeExecuteAsync(UpdateUserByIdParameters parameters, CancellationToken cancellationToken)
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
        {
            throw new System.NotImplementedException();
        }