Пример #1
0
 internal void Initialize()
 {
     if (ConfigSectionsOrGroups != null)
     {
         foreach (object element in ConfigSectionsOrGroups)
         {
             if (element is ChoConfigurationSection)
             {
                 if (!((ChoConfigurationSection)element).Name.IsNullOrWhiteSpace())
                 {
                     _sectionsDict.Add(((ChoConfigurationSection)element).Name, element as ChoConfigurationSection);
                 }
             }
             else if (element is ChoConfigurationSectionGroup)
             {
                 ChoConfigurationSectionGroup configurationSectionGroup = element as ChoConfigurationSectionGroup;
                 if (!configurationSectionGroup.Name.IsNullOrWhiteSpace())
                 {
                     configurationSectionGroup.Initialize();
                     _sectionGroupsDict.Add(configurationSectionGroup.Name, configurationSectionGroup);
                 }
             }
         }
     }
 }
Пример #2
0
 internal void Initialize()
 {
     if (ConfigSection != null)
     {
         ConfigSection.Initialize();
     }
     else
     {
         ConfigSection = new ChoConfigurationSectionGroup();
     }
 }