/// <summary> /// Gets the a <see cref="ConfigurationSectionInfo"/> for the exception handling settings 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 exception handling settings configuration section.</returns> protected override ConfigurationSectionInfo GetConfigurationSectionInfo(IServiceProvider serviceProvider) { ConfigurationNode rootNode = ServiceHelper.GetCurrentRootNode(serviceProvider); ExceptionHandlingSettingsNode node = null; if (null != rootNode) node = rootNode.Hierarchy.FindNodeByType(rootNode, typeof(ExceptionHandlingSettingsNode)) as ExceptionHandlingSettingsNode; ExceptionHandlingSettings exceptionHandlingConfiguration = null; if (node == null) { exceptionHandlingConfiguration = null ; } else { ExceptionHandlingSettingsBuilder builder = new ExceptionHandlingSettingsBuilder(serviceProvider, node); exceptionHandlingConfiguration = builder.Build(); } return new ConfigurationSectionInfo(node, exceptionHandlingConfiguration, ExceptionHandlingSettings.SectionName); }
/// <summary> /// Gets the a <see cref="ConfigurationSectionInfo"/> for the exception handling settings 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 exception handling settings configuration section.</returns> protected override ConfigurationSectionInfo GetConfigurationSectionInfo(IServiceProvider serviceProvider) { ConfigurationNode rootNode = ServiceHelper.GetCurrentRootNode(serviceProvider); ExceptionHandlingSettingsNode node = null; if (null != rootNode) { node = rootNode.Hierarchy.FindNodeByType(rootNode, typeof(ExceptionHandlingSettingsNode)) as ExceptionHandlingSettingsNode; } ExceptionHandlingSettings exceptionHandlingConfiguration = null; if (node == null) { exceptionHandlingConfiguration = null; } else { ExceptionHandlingSettingsBuilder builder = new ExceptionHandlingSettingsBuilder(serviceProvider, node); exceptionHandlingConfiguration = builder.Build(); } return(new ConfigurationSectionInfo(node, exceptionHandlingConfiguration, ExceptionHandlingSettings.SectionName)); }