Exemplo n.º 1
0
        public AuthorizeModule(IAuthorizeHubConnection globalConnectionAuthorizer, IAuthorizeHubMethodInvocation globalInvocationAuthorizer)
        {
            // Set global authorizers
            _globalConnectionAuthorizer = globalConnectionAuthorizer;
            _globalInvocationAuthorizer = globalInvocationAuthorizer;

            // Initialize attribute authorizer caches
            _connectionAuthorizersCache       = new ConcurrentDictionary <Type, IEnumerable <IAuthorizeHubConnection> >();
            _classInvocationAuthorizersCache  = new ConcurrentDictionary <Type, IEnumerable <IAuthorizeHubMethodInvocation> >();
            _methodInvocationAuthorizersCache = new ConcurrentDictionary <MethodDescriptor, IEnumerable <IAuthorizeHubMethodInvocation> >();
        }
Exemplo n.º 2
0
        public AuthorizeModule(IAuthorizeHubConnection globalConnectionAuthorizer, IAuthorizeHubMethodInvocation globalInvocationAuthorizer)
        {
            // Set global authorizers
            _globalConnectionAuthorizer = globalConnectionAuthorizer;
            _globalInvocationAuthorizer = globalInvocationAuthorizer;

            // Initialize attribute authorizer caches
            _connectionAuthorizersCache = new ConcurrentDictionary<Type, IEnumerable<IAuthorizeHubConnection>>();
            _classInvocationAuthorizersCache = new ConcurrentDictionary<Type, IEnumerable<IAuthorizeHubMethodInvocation>>();
            _methodInvocationAuthorizersCache = new ConcurrentDictionary<MethodDescriptor, IEnumerable<IAuthorizeHubMethodInvocation>>();
        }