private static SectionList GetConfigurationSections(string sectionGroupName, IAppHostSectionGroup sectionGroup) { SectionList sectionList = new SectionList(); string text = string.IsNullOrEmpty(sectionGroupName) ? sectionGroup.Name : (sectionGroupName + "/" + sectionGroup.Name); for (uint num = 0u; num < sectionGroup.Count; num += 1u) { IAppHostSectionGroup sectionGroup2 = sectionGroup[num]; SectionList configurationSections = GetConfigurationSections(text, sectionGroup2); sectionList.AddRange(configurationSections); } IAppHostSectionDefinitionCollection sections = sectionGroup.Sections; for (uint num2 = 0u; num2 < sections.Count; num2 += 1u) { IAppHostSectionDefinition appHostSectionDefinition = sections[num2]; sectionList.Add(new SectionDefinition(string.IsNullOrEmpty(text) ? appHostSectionDefinition.Name : (text + "/" + appHostSectionDefinition.Name), (AllowDefinition)Enum.Parse(typeof(AllowDefinition), appHostSectionDefinition.AllowDefinition, true), (OverrideModeDefault)Enum.Parse(typeof(OverrideModeDefault), appHostSectionDefinition.OverrideModeDefault, true), appHostSectionDefinition.Type)); } return(sectionList); }