Example #1
0
 public AuthorizationDeclarationInfo Get(CompiledPageActionDescriptor descriptor)
 {
     lock (pageLocker)
     {
         string key = $"{descriptor.ModelTypeInfo.FullName}.{descriptor.HandlerMethods[0].MethodInfo.Name}";
         return(pageCache.Get(key, k => CacheFallbackCollection.PageAuthorizationDeclarationFallback(descriptor)));
     }
 }
Example #2
0
 public AuthorizationDeclarationInfo Get(ControllerActionDescriptor descriptor)
 {
     lock (mvcLocker)
     {
         string key = $"{descriptor.ControllerTypeInfo.FullName}.{descriptor.MethodInfo.Name}";
         return(mvcCache.Get(key, k => CacheFallbackCollection.ControllerAuthorizationDeclarationFallback(descriptor)));
     }
 }