public Task <ActionResult> GetEventArgsAsync([FromServices] IGetEventArgsHandler handler, CancellationToken cancellationToken) { if (handler is null) { throw new ArgumentNullException(nameof(handler)); } return(InvokeGetEventArgsAsync(handler, cancellationToken)); }
private static async Task <ActionResult> InvokeGetEventArgsAsync([FromServices] IGetEventArgsHandler handler, CancellationToken cancellationToken) { return(await handler.ExecuteAsync(cancellationToken)); }