internal ConfigurationSectionGroupCollection(MgmtConfigurationRecord configRecord, ConfigurationSectionGroup configSectionGroup) : base(StringComparer.Ordinal)
 {
     this._configRecord       = configRecord;
     this._configSectionGroup = configSectionGroup;
     foreach (DictionaryEntry entry in this._configRecord.SectionGroupFactories)
     {
         FactoryId id = (FactoryId)entry.Value;
         if (id.Group == this._configSectionGroup.SectionGroupName)
         {
             base.BaseAdd(id.Name, id.Name);
         }
     }
 }
예제 #2
0
        //
        // Create the collection of all sections in the section group.
        //
        internal ConfigurationSectionCollection(MgmtConfigurationRecord configRecord, ConfigurationSectionGroup configSectionGroup) :
            base(StringComparer.Ordinal)
        {
            _configRecord       = configRecord;
            _configSectionGroup = configSectionGroup;

            foreach (DictionaryEntry de in _configRecord.SectionFactories)
            {
                FactoryId factoryId = (FactoryId)de.Value;
                if (factoryId.Group == _configSectionGroup.SectionGroupName)
                {
                    BaseAdd(factoryId.Name, factoryId.Name);
                }
            }
        }
        //
        // Get all the factories available, both in this file and inherited.
        //
        private Hashtable GetAllFactories(bool isGroup) {
            Hashtable   factories = new Hashtable();

            MgmtConfigurationRecord configRecord = this;
            do {
                if (configRecord._factoryRecords != null) {
                    foreach (FactoryRecord factoryRecord in configRecord._factoryRecords.Values) {
                        if (factoryRecord.IsGroup == isGroup) {
                            string configKey = factoryRecord.ConfigKey;
                            factories[configKey] = new FactoryId(factoryRecord.ConfigKey, factoryRecord.Group, factoryRecord.Name);
                        }
                    }
                }

                configRecord = configRecord.MgmtParent;
            } while (!configRecord.IsRootConfig);

            return factories;
        }
 private Hashtable GetAllFactories(bool isGroup)
 {
     Hashtable hashtable = new Hashtable();
     MgmtConfigurationRecord mgmtParent = this;
     do
     {
         if (mgmtParent._factoryRecords != null)
         {
             foreach (FactoryRecord record2 in mgmtParent._factoryRecords.Values)
             {
                 if (record2.IsGroup == isGroup)
                 {
                     string configKey = record2.ConfigKey;
                     hashtable[configKey] = new FactoryId(record2.ConfigKey, record2.Group, record2.Name);
                 }
             }
         }
         mgmtParent = mgmtParent.MgmtParent;
     }
     while (!mgmtParent.IsRootConfig);
     return hashtable;
 }