Example #1
0
        public INFDataSet(IniFile infFile)
        {
            Sections = new Dictionary <string, INFSection>();

            foreach (string sectionName in infFile.GetSectionNames())
            {
                Dictionary <string, INFEntry> entries = new Dictionary <string, INFEntry>();
                INFSection section = new INFSection(sectionName, entries);

                foreach (string key in infFile.GetSectionKeys(sectionName))
                {
                    string   value = infFile.GetKeyValue(sectionName, key);
                    INFEntry entry = new INFEntry(section, key, value);
                    entries.Add(key, entry);
                }

                Sections.Add(sectionName, section);
            }
        }
Example #2
0
 public string GetValue(INFSection section, string key) =>
 GetEntry(section, key)?.Value;
Example #3
0
 public INFEntry(INFSection section, string key, string value)
 {
     Section = section;
     Key     = key;
     Value   = value;
 }
Example #4
0
 public INFEntry GetEntry(INFSection section, string key) =>
 section?.GetEntry(key);