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

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