/// <summary>
 /// Gets the a <see cref="ConfigurationSectionInfo"/> for the oracle connection configuration section.
 /// </summary>
 /// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
 /// <returns>A <see cref="ConfigurationSectionInfo"/> for the oracle connection configuration section.</returns>
 protected override ConfigurationSectionInfo GetConfigurationSectionInfo(IServiceProvider serviceProvider)
 {
     ConfigurationNode rootNode = ServiceHelper.GetCurrentRootNode(serviceProvider);
     ODP10ConnectionSettings odp10ConnectionSection = null;
     IList<ConfigurationNode> connections = rootNode.Hierarchy.FindNodesByType(typeof(OracleConnectionElementNode));
     if (connections.Count == 0)
     {
         odp10ConnectionSection = null;
     }
     else
     {
         ODP10ConnectionSettingsBuilder builder = new ODP10ConnectionSettingsBuilder(serviceProvider);
         odp10ConnectionSection = builder.Build();
     }
     return new ConfigurationSectionInfo(rootNode, odp10ConnectionSection, ODP10ConnectionSettings.SectionName);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the a <see cref="ConfigurationSectionInfo"/> for the oracle connection configuration section.
        /// </summary>
        /// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param>
        /// <returns>A <see cref="ConfigurationSectionInfo"/> for the oracle connection configuration section.</returns>
        protected override ConfigurationSectionInfo GetConfigurationSectionInfo(IServiceProvider serviceProvider)
        {
            ConfigurationNode         rootNode = ServiceHelper.GetCurrentRootNode(serviceProvider);
            ODP10ConnectionSettings   odp10ConnectionSection = null;
            IList <ConfigurationNode> connections            = rootNode.Hierarchy.FindNodesByType(typeof(OracleConnectionElementNode));

            if (connections.Count == 0)
            {
                odp10ConnectionSection = null;
            }
            else
            {
                ODP10ConnectionSettingsBuilder builder = new ODP10ConnectionSettingsBuilder(serviceProvider);
                odp10ConnectionSection = builder.Build();
            }
            return(new ConfigurationSectionInfo(rootNode, odp10ConnectionSection, ODP10ConnectionSettings.SectionName));
        }