public void Clear() { Commits?.Clear(); Branches?.Clear(); Edges?.Clear(); CommitToModel?.Clear(); ContentCleared?.Invoke(); }
public void CreateEdgePairs() { CommitToModel.Clear(); Edges.Clear(); foreach (var c in Commits) { CommitToModel.Add(c.Commit, c); Edges.Add(c, new List <Tuple <CommitNodeModel, CommitNodeModel> >()); } foreach (var c in Commits) { foreach (var parent in c.Commit.Parents) { Edges[CommitToModel[parent]].Add(new Tuple <CommitNodeModel, CommitNodeModel>(CommitToModel[parent], c)); Edges[c].Add(new Tuple <CommitNodeModel, CommitNodeModel>(CommitToModel[parent], c)); } } }