public void AddToBinaryFileCounter() { BinaryFileAmount++; if (Parent != null) { Parent.AddToBinaryFileCounter(); } }
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(); } }