public async Task HandleAsync(AuthorizationContext context)
 {
     foreach (var handler in context.Requirements.OfType<IAuthorizationHandler>())
     {
         await handler.HandleAsync(context);
     }
 }
 public void Handle(AuthorizationContext context)
 {
     foreach (var handler in context.Requirements.OfType<IAuthorizationHandler>())
     {
         handler.Handle(context);
     }
 }
示例#3
0
 // REVIEW: do we need an async hook too?
 public abstract void Handle(AuthorizationContext context, TRequirement requirement);
示例#4
0
 public virtual Task HandleAsync(AuthorizationContext context)
 {
     Handle(context);
     return(Task.FromResult(0));
 }