示例#1
0
 public Task HandleAsync(IMiddlewareAsyncContext context, CancellationToken cancellationToken)
 {
     if (_IsCompatible <TAction>(context.Action))
     {
         return(_middleware.HandleAsync(new MiddlewareAsyncContextAdapter <TAction>(context), cancellationToken));
     }
     else
     {
         return(context.NextAsync(cancellationToken));
     }
 }
 public Task NextAsync(object action, CancellationToken cancellationToken)
 => _context.NextAsync(action, cancellationToken);