private void BuildAuthorizationProviders(AuthorizationProviderData authorizationProviderData)
        {
            ConfigurationNode authorizationProviderNode = NodeCreationService.CreateNodeByDataType(authorizationProviderData.GetType(), new object[] { authorizationProviderData });
            if (null == authorizationProviderNode)
            {
                LogNodeMapError(authorizationProviderCollectionNode_, authorizationProviderData.GetType());
                return;
            }
            if (typeof(AuthorizationRuleProviderData) == authorizationProviderData.GetType())
            {
                AuthorizationRuleProviderData authorizationRuleProviderData = (AuthorizationRuleProviderData)authorizationProviderData;
                this.authorizationRuleProviderNode = (AuthorizationRuleProviderNode)authorizationProviderNode;

                authorizationRuleProviderData.Rules.ForEach(new Action<AuthorizationRuleData>(BuildAuthorizationRule));
            }
            if (authorizationProviderNode.Name == settings.DefaultAuthorizationProviderName) defaultAuthorizationNode = (AuthorizationProviderNode)authorizationProviderNode;
            authorizationProviderCollectionNode_.AddNode(authorizationProviderNode);
        }
Пример #2
0
        private void BuildAuthorizationProviders(AuthorizationProviderData authorizationProviderData)
        {
            ConfigurationNode authorizationProviderNode = NodeCreationService.CreateNodeByDataType(authorizationProviderData.GetType(), new object[] { authorizationProviderData });

            if (null == authorizationProviderNode)
            {
                LogNodeMapError(authorizationProviderCollectionNode_, authorizationProviderData.GetType());
                return;
            }
            if (typeof(AuthorizationRuleProviderData) == authorizationProviderData.GetType())
            {
                AuthorizationRuleProviderData authorizationRuleProviderData = (AuthorizationRuleProviderData)authorizationProviderData;
                this.authorizationRuleProviderNode = (AuthorizationRuleProviderNode)authorizationProviderNode;

                authorizationRuleProviderData.Rules.ForEach(new Action <AuthorizationRuleData>(BuildAuthorizationRule));
            }
            if (authorizationProviderNode.Name == settings.DefaultAuthorizationProviderName)
            {
                defaultAuthorizationNode = (AuthorizationProviderNode)authorizationProviderNode;
            }
            authorizationProviderCollectionNode_.AddNode(authorizationProviderNode);
        }
Пример #3
0
 private void OnAuthorizationDefaultProviderRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     this.defaultAuthorizationProviderNode = null;
 }
 private void OnAuthorizationDefaultProviderRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     this.defaultAuthorizationProviderNode = null;
 }