예제 #1
0
        /// <devdoc>
        /// Creates a new ConfigurationSectionNode with storage and transformer.
        /// </devdoc>
        internal static ReadOnlyConfigurationSectionNode CreateReadOnlyDefault(string sectionName, ConfigurationNode parent)
        {
            ReadOnlyConfigurationSectionNode sectionNode = new ReadOnlyConfigurationSectionNode(new ReadOnlyConfigurationSectionData(sectionName));

            parent.Nodes.Add(sectionNode);
            XmlFileStorageProviderNode storageNode = new XmlFileStorageProviderNode(new XmlFileStorageProviderData(SR.XMLStorageProviderNodeFriendlyName, sectionName + ".config"));

            sectionNode.Nodes.Add(storageNode);
            XmlSerializerTransformerNode transformerNode = new XmlSerializerTransformerNode();

            sectionNode.Nodes.Add(transformerNode);
            return(sectionNode);
        }
예제 #2
0
 /// <devdoc>
 /// Creates a new ConfigurationSectionNode with storage and transformer.
 /// </devdoc>
 internal static ReadOnlyConfigurationSectionNode CreateReadOnlyDefault(string sectionName, ConfigurationNode parent)
 {
     ReadOnlyConfigurationSectionNode sectionNode = new ReadOnlyConfigurationSectionNode(new ReadOnlyConfigurationSectionData(sectionName));
     parent.Nodes.Add(sectionNode);
     XmlFileStorageProviderNode storageNode = new XmlFileStorageProviderNode(new XmlFileStorageProviderData(SR.XMLStorageProviderNodeFriendlyName, sectionName + ".config"));
     sectionNode.Nodes.Add(storageNode);
     XmlSerializerTransformerNode transformerNode = new XmlSerializerTransformerNode();
     sectionNode.Nodes.Add(transformerNode);
     return sectionNode;
 }