Example #1
0
        public Task <GetEventArgByIdResult> ExecuteAsync(GetEventArgByIdParameters parameters, CancellationToken cancellationToken = default)
        {
            if (parameters is null)
            {
                throw new System.ArgumentNullException(nameof(parameters));
            }

            return(InvokeExecuteAsync(parameters, cancellationToken));
        }
Example #2
0
        public Task <ActionResult> GetEventArgByIdAsync(GetEventArgByIdParameters parameters, [FromServices] IGetEventArgByIdHandler handler, CancellationToken cancellationToken)
        {
            if (handler is null)
            {
                throw new ArgumentNullException(nameof(handler));
            }

            return(InvokeGetEventArgByIdAsync(parameters, handler, cancellationToken));
        }
Example #3
0
        public Task <GetEventArgByIdResult> ExecuteAsync(GetEventArgByIdParameters parameters, CancellationToken cancellationToken = default)
        {
            var data = new Demo.Api.Generated.Contracts.Eventargs.EventArgs
            {
                Id        = Guid.Parse("77a33260-0000-441f-ba60-b0a833803fab"),
                EventName = "Hallo1",
            };

            return(Task.FromResult(GetEventArgByIdResult.Ok(data)));
        }
Example #4
0
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
        private async Task <GetEventArgByIdResult> InvokeExecuteAsync(GetEventArgByIdParameters parameters, CancellationToken cancellationToken)
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
        {
            throw new System.NotImplementedException();
        }
Example #5
0
 private static async Task <ActionResult> InvokeGetEventArgByIdAsync(GetEventArgByIdParameters parameters, IGetEventArgByIdHandler handler, CancellationToken cancellationToken)
 {
     return(await handler.ExecuteAsync(parameters, cancellationToken));
 }