コード例 #1
0
        public Task <ActionResult> GetEventArgsAsync([FromServices] IGetEventArgsHandler handler, CancellationToken cancellationToken)
        {
            if (handler is null)
            {
                throw new ArgumentNullException(nameof(handler));
            }

            return(InvokeGetEventArgsAsync(handler, cancellationToken));
        }
コード例 #2
0
 private static async Task <ActionResult> InvokeGetEventArgsAsync([FromServices] IGetEventArgsHandler handler, CancellationToken cancellationToken)
 {
     return(await handler.ExecuteAsync(cancellationToken));
 }