public void RemoveChildContainer(string tag) { ISettingsContainer child; if (ChildrenMap.TryGetValue(tag, out child)) { child.Clear(); ChildrenMap.Remove(tag); if (child is IDisposable) { ((IDisposable)child).Dispose(); } } }
public ISettingsContainer GetOrCreateChildContainer(string tag) { if (tag == null) { throw new ArgumentNullException(nameof(tag)); } ISettingsContainer child; if (!ChildrenMap.TryGetValue(tag, out child)) { child = new ProxySettingsContainer(this, tag); ChildrenMap[tag] = child; } return(child); }