/// <summary> /// Processes parsed key/value pair /// </summary> private static void ProcessKeyValuePair(IniSection CurrentSection, string Key, string SingleValue, ParseAction Action) { switch (Action) { case ParseAction.New: { // New/replace IniValues Value; if (CurrentSection.TryGetValue(Key, out Value) == false) { Value = new IniValues(); CurrentSection.Add(Key, Value); } Value.Clear(); Value.Add(SingleValue); } break; case ParseAction.Add: { IniValues Value; if (CurrentSection.TryGetValue(Key, out Value) == false) { Value = new IniValues(); CurrentSection.Add(Key, Value); } Value.Add(SingleValue); } break; case ParseAction.Remove: { IniValues Value; if (CurrentSection.TryGetValue(Key, out Value)) { int ExistingIndex = Value.FindIndex(X => (String.Compare(SingleValue, X, true) == 0)); if (ExistingIndex >= 0) { Value.RemoveAt(ExistingIndex); } } } break; } }
public IniValues(IniValues Other) : base(Other) { }