public void Add(string DepotPath, int Idx) { int NextIdx = DepotPath.IndexOf('/', Idx); if (NextIdx == -1) { Files.Add(DepotPath); } else { string Fragment = DepotPath.Substring(Idx, NextIdx - Idx); TreeNode ChildNode; if (!ChildNodes.TryGetValue(Fragment, out ChildNode)) { ChildNode = new TreeNode(DepotPath.Substring(0, NextIdx)); ChildNodes.Add(Fragment, ChildNode); } ChildNode.Add(DepotPath, NextIdx + 1); } Count++; }
public void Add(SyntaxNode node) { ChildNode.Add(node); }