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