public void TestInitialize()
        {
			node = new ConfigurationApplicationNode(ConfigurationApplicationFile.FromCurrentAppDomain());
			serviceProvider = ServiceBuilder.Build();
			hierarchy = new ConfigurationUIHierarchy(node, serviceProvider);
            nodeA = new MyTestNode();
            nodeB = new MyTestNode();
            nodeC = new MyTestNode();
            node.AddNode(nodeA);
			node.AddNode(nodeB);
			node.AddNode(nodeC);
        }
 public void TestInitialize()
 {
     node            = new ConfigurationApplicationNode(ConfigurationApplicationFile.FromCurrentAppDomain());
     serviceProvider = ServiceBuilder.Build();
     hierarchy       = new ConfigurationUIHierarchy(node, serviceProvider);
     nodeA           = new MyTestNode();
     nodeB           = new MyTestNode();
     nodeC           = new MyTestNode();
     node.AddNode(nodeA);
     node.AddNode(nodeB);
     node.AddNode(nodeC);
 }
Exemple #3
0
 /// <summary>
 /// Opens the security settings configuration section, builds the design time nodes and adds them to the application node.
 /// </summary>
 /// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
 /// <param name="rootNode">The root node of the application.</param>
 /// <param name="section">The <see cref="ConfigurationSection"/> that was opened from the <see cref="IConfigurationSource"/>.</param>
 protected override void OpenCore(IServiceProvider serviceProvider, ConfigurationApplicationNode rootNode, ConfigurationSection section)
 {
     if (null != section)
     {
         rootNode.AddNode(new SecuritySettingsNodeBuilder(serviceProvider, (SecuritySettings)section).Build());
     }
 }
 /// <summary>
 /// Initializes the DGTEL.SampleAB.
 /// </summary>
 /// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
 /// <param name="rootNode">The root node of the application.</param>
 /// <param name="section">The <see cref="ConfigurationSection"/> that was opened from the <see cref="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.IConfigurationSource"/>.</param>
 protected override void OpenCore(IServiceProvider serviceProvider, ConfigurationApplicationNode rootNode, System.Configuration.ConfigurationSection section)
 {
     if (null != section)
     {
         ApplicationBlockSettingsNodeBuilder builder = new ApplicationBlockSettingsNodeBuilder(serviceProvider, (ApplicationBlockSettings)section);
         rootNode.AddNode(builder.Build());
     }
 }
Exemple #5
0
 /// <summary>
 /// Opens the caching configuration from an application configuration file.
 /// </summary>
 /// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
 /// <param name="rootNode">The <see cref="ConfigurationApplicationNode"/> of the hierarchy.</param>
 /// <param name="section">The caching configuration section or null if no section was found.</param>
 protected override void OpenCore(IServiceProvider serviceProvider, ConfigurationApplicationNode rootNode, ConfigurationSection section)
 {
     if (null != section)
     {
         CryptographyManagerSettingsNodeBuilder builder = new CryptographyManagerSettingsNodeBuilder(serviceProvider, (CryptographySettings)section);
         rootNode.AddNode(builder.Build());
     }
 }
Exemple #6
0
 /// <summary>
 /// Opens the logging settings configuration section, builds the design time nodes and adds them to the application node.
 /// </summary>
 /// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
 /// <param name="rootNode">The root node of the application.</param>
 /// <param name="section">The <see cref="ConfigurationSection"/> that was opened from the <see cref="IConfigurationSource"/>.</param>
 protected override void OpenCore(IServiceProvider serviceProvider, ConfigurationApplicationNode rootNode, ConfigurationSection section)
 {
     if (null != section)
     {
         LoggingSettingsNodeBuilder builder = new LoggingSettingsNodeBuilder(serviceProvider, (LoggingSettings)section);
         rootNode.AddNode(builder.Build());
     }
 }
 public void TestInitialize()
 {
     appNode         = new ConfigurationApplicationNode(ConfigurationApplicationFile.FromCurrentAppDomain());
     serviceProvider = ServiceBuilder.Build();
     hierarchy       = new ConfigurationUIHierarchy(appNode, serviceProvider);
     appNode.AddNode(new MyTestNode());
     removeEventCount = 0;
 }
 public void TestInitialize()
 {
     appNode = new ConfigurationApplicationNode(ConfigurationApplicationFile.FromCurrentAppDomain());
     serviceProvider = ServiceBuilder.Build();
     hierarchy = new ConfigurationUIHierarchy(appNode, serviceProvider);
     appNode.AddNode(new MyTestNode());
     removeEventCount = 0;
 }
		protected override void InitializeCore()
        {
			ConfigurationApplicationNode appNode = new ConfigurationApplicationNode();
            typeNode = new MyTypeTestNode();
            valueInfo1 = typeNode.GetType().GetProperty("TypeName");
			serviceProvider = ServiceBuilder.Build();
			appNode.AddNode(typeNode);
			hierarchy = new ConfigurationUIHierarchy(appNode, serviceProvider);
        }
		public void CreatingHierarchyWithPopulatedRootNodeSetsSites()
		{
			ConfigurationApplicationNode node1 = new ConfigurationApplicationNode(ConfigurationApplicationFile.FromCurrentAppDomain());
			TempNode node2 = new TempNode("2");
			node1.AddNode(node2);
			ConfigurationUIHierarchy hierarchy = new ConfigurationUIHierarchy(node1, ServiceProvider);

			Assert.IsNotNull(node2.Site);
		}
Exemple #11
0
        protected override void InitializeCore()
        {
            ConfigurationApplicationNode appNode = new ConfigurationApplicationNode();

            typeNode        = new MyTypeTestNode();
            valueInfo1      = typeNode.GetType().GetProperty("TypeName");
            serviceProvider = ServiceBuilder.Build();
            appNode.AddNode(typeNode);
            hierarchy = new ConfigurationUIHierarchy(appNode, serviceProvider);
        }
Exemple #12
0
 /// <summary>
 /// Opens the database settings configuration section, builds the design time nodes and adds them to the application node.
 /// </summary>
 /// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
 /// <param name="rootNode">The root node of the application.</param>
 /// <param name="section">The <see cref="ConfigurationSection"/> that was opened from the <see cref="IConfigurationSource"/>.</param>
 protected override void OpenCore(IServiceProvider serviceProvider, ConfigurationApplicationNode rootNode, ConfigurationSection section)
 {
     if (null != section)
     {
         DatabaseSectionNodeBuilder builder = new DatabaseSectionNodeBuilder(serviceProvider, (DatabaseSettings)section);
         DatabaseSectionNode        node    = builder.Build();
         SetProtectionProvider(section, node);
         rootNode.AddNode(node);
     }
 }
Exemple #13
0
 /// <summary>
 /// Opens the security settings configuration section, builds the design time nodes and adds them to the application node.
 /// </summary>
 /// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
 /// <param name="rootNode">The root node of the application.</param>
 /// <param name="section">The <see cref="ConfigurationSection"/> that was opened from the <see cref="IConfigurationSource"/>.</param>
 protected override void OpenCore(IServiceProvider serviceProvider, ConfigurationApplicationNode rootNode, ConfigurationSection section)
 {
     if (null != section)
     {
         SecuritySettingsNodeBuilder nodeBuilder = new SecuritySettingsNodeBuilder(serviceProvider, (SecuritySettings)section);
         SecuritySettingsNode        node        = nodeBuilder.Build();
         SetProtectionProvider(section, node);
         rootNode.AddNode(node);
     }
 }
Exemple #14
0
        public void CreatingHierarchyWithPopulatedRootNodeSetsSites()
        {
            ConfigurationApplicationNode node1 = new ConfigurationApplicationNode(ConfigurationApplicationFile.FromCurrentAppDomain());
            TempNode node2 = new TempNode("2");

            node1.AddNode(node2);
            ConfigurationUIHierarchy hierarchy = new ConfigurationUIHierarchy(node1, ServiceProvider);

            Assert.IsNotNull(node2.Site);
        }
		protected override void InitializeCore()
        {
			ConfigurationApplicationNode appNode = new ConfigurationApplicationNode();
            minLengthNode = new MyMinLengthTestNode();
			appNode.AddNode(minLengthNode);
            valueInfo1 = minLengthNode.GetType().GetProperty("Value1");
            valueInfo2 = minLengthNode.GetType().GetProperty("Value2");
			serviceProvider = ServiceBuilder.Build();
			hierarchy = new ConfigurationUIHierarchy(appNode, serviceProvider);   
        }
Exemple #16
0
        /// <summary>
        /// Opens the caching configuration from an application configuration file.
        /// </summary>
        /// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
        /// <param name="rootNode">The <see cref="ConfigurationApplicationNode"/> of the hierarchy.</param>
        /// <param name="section">The caching configuration section or null if no section was found.</param>
        protected override void OpenCore(IServiceProvider serviceProvider, ConfigurationApplicationNode rootNode, ConfigurationSection section)
        {
            if (null != section)
            {
                CacheManagerSettingsNodeBuilder builder          = new CacheManagerSettingsNodeBuilder(serviceProvider, (CacheManagerSettings)section);
                CacheManagerSettingsNode        cacheManagerNode = builder.Build();
                SetProtectionProvider(section, cacheManagerNode);

                rootNode.AddNode(cacheManagerNode);
            }
        }
        protected override void InitializeCore()
        {
            ConfigurationApplicationNode appNode = new ConfigurationApplicationNode();

            minLengthNode = new MyMinLengthTestNode();
            appNode.AddNode(minLengthNode);
            valueInfo1      = minLengthNode.GetType().GetProperty("Value1");
            valueInfo2      = minLengthNode.GetType().GetProperty("Value2");
            serviceProvider = ServiceBuilder.Build();
            hierarchy       = new ConfigurationUIHierarchy(appNode, serviceProvider);
        }
Exemple #18
0
        /// <summary>
        /// Opens the appSettings section, builds the design time nodes and adds them to the application node.
        /// </summary>
        /// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
        /// <param name="rootNode">The root node of the application.</param>
        /// <param name="section">The <see cref="ConfigurationSection"/> that was opened from the <see cref="IConfigurationSource"/>.</param>
        protected override void OpenCore(IServiceProvider serviceProvider, ConfigurationApplicationNode rootNode, System.Configuration.ConfigurationSection section)
        {
            if (null != section)
            {
                AppSettingsNodeBuilder builder = new AppSettingsNodeBuilder(serviceProvider, (AppSettingsSection)section);
                AppSettingsNode        node    = builder.Build();
                SetProtectionProvider(section, node);

                rootNode.AddNode(node);
            }
        }
        public void FindTypeNodeInHierarchy()
        {
            ConfigurationApplicationFile applicationData = ConfigurationApplicationFile.FromCurrentAppDomain();
            ConfigurationApplicationNode applicationNode = new ConfigurationApplicationNode(applicationData);
            IConfigurationUIHierarchy    hierarchy       = new ConfigurationUIHierarchy(applicationNode, ServiceBuilder.Build());
            MyConfigNode configNode = new MyConfigNode("MyBlock");

            applicationNode.AddNode(configNode);
            ConfigurationNode node = (ConfigurationNode)hierarchy.FindNodeByType(typeof(MyConfigNode));

            Assert.IsNotNull(node);
            Assert.AreSame(configNode, node);
        }
Exemple #20
0
 protected override void OpenCore(IServiceProvider serviceProvider, ConfigurationApplicationNode rootNode, ConfigurationSection section)
 {
     rootNode.AddNode(new EnvironmentalOverridesNode());
 }