Inheritance: ConfigBase
コード例 #1
0
        /// <summary>
        /// Loads the configuration file.
        /// </summary>
        private void Load()
        {
            IniConfig  config  = null;
            IniSection section = null;
            IniItem    item    = null;

            for (int j = 0; j < iniDocument.Sections.Count; j++)
            {
                section = iniDocument.Sections[j];
                config  = new IniConfig(section.Name, this);

                for (int i = 0; i < section.ItemCount; i++)
                {
                    item = section.GetItem(i);

                    if (item.Type == IniType.Key)
                    {
                        config.Add(item.Name, item.Value);
                    }
                }

                Configs.Add(config);
            }
        }
コード例 #2
0
ファイル: IniConfigSource.cs プロジェクト: debop/NFramework
        /// <summary>
        /// Loads the configuration file.
        /// </summary>
        private void Load() {
            IniConfig config = null;
            IniSection section = null;
            IniItem item = null;

            for(int j = 0; j < iniDocument.Sections.Count; j++) {
                section = iniDocument.Sections[j];
                config = new IniConfig(section.Name, this);

                for(int i = 0; i < section.ItemCount; i++) {
                    item = section.GetItem(i);

                    if(item.Type == IniType.Key) {
                        config.Add(item.Name, item.Value);
                    }
                }

                Configs.Add(config);
            }
        }