public Task <ActionResult> GetEventArgsByIdAsync(GetEventArgsByIdParameters parameters, [FromServices] IGetEventArgsByIdHandler handler, CancellationToken cancellationToken)
        {
            if (handler is null)
            {
                throw new ArgumentNullException(nameof(handler));
            }

            return(InvokeGetEventArgsByIdAsync(parameters, handler, cancellationToken));
        }
        public Task <GetEventArgsByIdResult> ExecuteAsync(GetEventArgsByIdParameters parameters, CancellationToken cancellationToken = default)
        {
            if (parameters is null)
            {
                throw new System.ArgumentNullException(nameof(parameters));
            }

            return(InvokeExecuteAsync(parameters, cancellationToken));
        }
Beispiel #3
0
        public Task <GetEventArgsByIdResult> ExecuteAsync(GetEventArgsByIdParameters parameters, CancellationToken cancellationToken = default)
        {
            var data = new Scenario2.Api.Generated.Contracts.Eventargs.EventArgs
            {
                Id        = Guid.Parse("77a33260-0000-441f-ba60-b0a833803fab"),
                EventName = "Hallo1",
            };

            return(Task.FromResult(GetEventArgsByIdResult.Ok(data)));
        }
 private static async Task <ActionResult> InvokeGetEventArgsByIdAsync(GetEventArgsByIdParameters parameters, IGetEventArgsByIdHandler handler, CancellationToken cancellationToken)
 {
     return(await handler.ExecuteAsync(parameters, cancellationToken));
 }
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
        private async Task <GetEventArgsByIdResult> InvokeExecuteAsync(GetEventArgsByIdParameters parameters, CancellationToken cancellationToken)
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
        {
            throw new System.NotImplementedException();
        }