private void CreateConfigurationSourceElement(ConfigurationSourceSectionNode node, ConfigurationSourceElement configurationSourceElement)
		{
			ConfigurationNode sourceNode = NodeCreationService.CreateNodeByDataType(configurationSourceElement.GetType(), new object[] { configurationSourceElement });
			if (null == sourceNode)
			{
				LogNodeMapError(node, configurationSourceElement.GetType());
				return;
			}
			if (configurationSourceSection.SelectedSource == configurationSourceElement.Name) defaultNode = (ConfigurationSourceElementNode)sourceNode;
			node.AddNode(sourceNode);
		}
Esempio n. 2
0
        public ConfigurationSourceSection Build()
        {
            ConfigurationSourceSection section = new ConfigurationSourceSection();

            section.SelectedSource = configurationSourceSectionNode.SelectedSource.Name;
            for (int index = 0; index < configurationSourceSectionNode.Nodes.Count; ++index)
            {
                ConfigurationSourceElementNode sourceNode = (ConfigurationSourceElementNode)configurationSourceSectionNode.Nodes[index];
                section.Sources.Add(sourceNode.ConfigurationSourceElement);
            }
            return(section);
        }
Esempio n. 3
0
        private void CreateConfigurationSourceElement(ConfigurationSourceSectionNode node, ConfigurationSourceElement configurationSourceElement)
        {
            ConfigurationNode sourceNode = NodeCreationService.CreateNodeByDataType(configurationSourceElement.GetType(), new object[] { configurationSourceElement });

            if (null == sourceNode)
            {
                LogNodeMapError(node, configurationSourceElement.GetType());
                return;
            }
            if (configurationSourceSection.SelectedSource == configurationSourceElement.Name)
            {
                defaultNode = (ConfigurationSourceElementNode)sourceNode;
            }
            node.AddNode(sourceNode);
        }
Esempio n. 4
0
        public ConfigurationSourceSection Build()
        {
            ConfigurationSourceSection section = new ConfigurationSourceSection();

            if (!configurationSourceSectionNode.RequirePermission)              // don't set if false
            {
                section.SectionInformation.RequirePermission = configurationSourceSectionNode.RequirePermission;
            }
            section.SelectedSource = configurationSourceSectionNode.SelectedSource.Name;
            for (int index = 0; index < configurationSourceSectionNode.Nodes.Count; ++index)
            {
                ConfigurationSourceElementNode sourceNode = (ConfigurationSourceElementNode)configurationSourceSectionNode.Nodes[index];
                section.Sources.Add(sourceNode.ConfigurationSourceElement);
            }
            return(section);
        }
		private void OnElementNodeRemoved(object sender, ConfigurationNodeChangedEventArgs args)
		{
			configurationSourceElementNode = null;
		}
Esempio n. 6
0
 private void OnElementNodeRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     configurationSourceElementNode = null;
 }