Configuration.GetEffectiveSectionGroup Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the effective section groups for the configuration file.
public:
Microsoft::Web::Administration::SectionGroup ^ GetEffectiveSectionGroup();
public Microsoft.Web.Administration.SectionGroup GetEffectiveSectionGroup ();
member this.GetEffectiveSectionGroup : unit -> Microsoft.Web.Administration.SectionGroup
Public Function GetEffectiveSectionGroup () As SectionGroup
Returns
A SectionGroup object that contains section groups and sections.
Examples
The following example gets section groups for the Configuration object and displays the name of each section definition within the section group.
public void GetGetEffectiveSectionGroup(ServerManager manager)
{
Configuration config = manager.GetAdministrationConfiguration();
SectionGroup sectionGroup = config.GetEffectiveSectionGroup();
Console.WriteLine("There are " + sectionGroup.Sections.Count.ToString() +
" Sections in the section group: " + sectionGroup.SectionGroups.ToString());
foreach (SectionDefinition def in sectionGroup.Sections)
{
Console.WriteLine("\t{0}", def.Name);
}
}
Remarks
The SectionGroup object is read-only merge of the section groups and sections. This includes the root section group.