public Task <GetEventArgByIdResult> ExecuteAsync(GetEventArgByIdParameters parameters, CancellationToken cancellationToken = default) { if (parameters is null) { throw new System.ArgumentNullException(nameof(parameters)); } return(InvokeExecuteAsync(parameters, cancellationToken)); }
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)); }
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))); }
#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(); }
private static async Task <ActionResult> InvokeGetEventArgByIdAsync(GetEventArgByIdParameters parameters, IGetEventArgByIdHandler handler, CancellationToken cancellationToken) { return(await handler.ExecuteAsync(parameters, cancellationToken)); }