public void DeleteChildNode(char c) { if (ChildrenMap.ContainsKey(c)) { ChildrenMap.Remove(c); } }
public void Add(ScriptCommand scriptScope) { if (!AllowDuplicates && ChildrenMap.ContainsKey(scriptScope.Name)) { return; } Children.Add(scriptScope); ChildrenMap[scriptScope.Name] = scriptScope; scriptScope.Parent = this; }
public void Remove(object scriptScope) { Children.Remove(scriptScope); if (scriptScope is ScriptScope) { ChildrenMap.Remove(((ScriptScope)scriptScope).Name); Scopes.Remove(((ScriptScope)scriptScope)); ((ScriptScope)scriptScope).Parent = null; } if (scriptScope is ScriptCommand) { ChildrenMap.Remove(((ScriptCommand)scriptScope).Name); ((ScriptCommand)scriptScope).Parent = null; } }
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 void Add(ScriptScope scriptScope) { if (!AllowDuplicates && ChildrenMap.ContainsKey(scriptScope.Name)) { return; } Children.Add(scriptScope); if (scriptScope.Name == null) { scriptScope.Name = ChildrenMap.Count.ToString(); } ChildrenMap[scriptScope.Name] = scriptScope; Scopes.Add(scriptScope); scriptScope.Parent = this; }
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); }
public TrieNode FindChildNode(char c) => ChildrenMap.ContainsKey(c) ? ChildrenMap[c] : null;