internal string GetSetting(SectionPair sectionPair) { var value = _data[sectionPair]; if (value.Count > 1) { throw new InvalidOperationException("Section contains multiple values"); } return(value[0]); }
internal void AddSetting(SectionPair sectionPair, string sectionValue) { if (!_data.ContainsKey(sectionPair)) { _data.Add(sectionPair, new List <string> { sectionValue }); } else { _data[sectionPair].Add(sectionValue); } }
private KeyValuePair <SectionPair, string> ReadSectionPair(string line, string sectionName) { var pair = line.Split(new[] { UnrealIniSyntax.KeyValuePairDelimeter }, 2); string value = null; var sectionPair = new SectionPair { Section = sectionName, Key = pair[0] }; if (pair.Length > 1) { value = pair[1]; } return(new KeyValuePair <SectionPair, string>(sectionPair, value)); }
internal string GetSetting(SectionPair sectionPair) { var value = _data[sectionPair]; if (value.Count > 1) throw new InvalidOperationException("Section contains multiple values"); return value[0]; }
internal string[] GetMultilineSetting(SectionPair sectionPair) { return _data[sectionPair].ToArray(); }
internal void AddSetting(SectionPair sectionPair, string sectionValue) { if (!_data.ContainsKey(sectionPair)) _data.Add(sectionPair, new List<string> { sectionValue }); else _data[sectionPair].Add(sectionValue); }
internal string[] GetMultilineSetting(SectionPair sectionPair) { return(_data[sectionPair].ToArray()); }