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); } }
public string GetValue(INFSection section, string key) => GetEntry(section, key)?.Value;
public INFEntry(INFSection section, string key, string value) { Section = section; Key = key; Value = value; }
public INFEntry GetEntry(INFSection section, string key) => section?.GetEntry(key);