public void AddToTextFileCounter() { TextFileAmount++; if (Parent != null) { Parent.AddToTextFileCounter(); } }
public void AddToDict(long revision, string path, bool binary) { NodeDiffAmount nda = new NodeDiffAmount(null); dict[new Tuple <long, string>(revision, path)] = nda; NodeDiffAmount previous = nda; string next = path; while (next != "") { string parentPath = next = Utils.GetParentPath(next); NodeDiffAmount parent; if (dict.TryGetValue(new Tuple <long, string>(revision, parentPath), out parent)) { previous.Parent = parent; parent.Children.Add(previous); break; } else { dict[new Tuple <long, string>(revision, parentPath)] = parent = new NodeDiffAmount(null); previous.Parent = parent; parent.Children.Add(previous); previous = parent; } } if (binary) { nda.AddToBinaryFileCounter(); } else { nda.AddToTextFileCounter(); } }