private void FillTagTree(IEnumerable <GitRef> tags) { var nodes = new Dictionary <string, BaseBranchNode>(); foreach (var tag in tags) { var branchNode = new TagNode(this, tag.Name, tag); var parent = branchNode.CreateRootNode(nodes, (tree, parentPath) => new BasePathNode(tree, parentPath)); if (parent != null) { Nodes.AddNode(parent); } } }
private Nodes FillTagTree(IEnumerable <IGitRef> tags, CancellationToken token) { var nodes = new Nodes(this); var pathToNodes = new Dictionary <string, BaseBranchNode>(); foreach (var tag in tags) { token.ThrowIfCancellationRequested(); var branchNode = new TagNode(this, tag.Name, tag); var parent = branchNode.CreateRootNode(pathToNodes, (tree, parentPath) => new BasePathNode(tree, parentPath)); if (parent != null) { nodes.AddNode(parent); } } return(nodes); }
private Nodes FillTagTree(IReadOnlyList <IGitRef> tags, CancellationToken token) { var nodes = new Nodes(this); var pathToNodes = new Dictionary <string, BaseBranchNode>(); foreach (IGitRef tag in tags) { token.ThrowIfCancellationRequested(); bool isVisible = !IsFiltering.Value || (tag.ObjectId is not null && _refsSource.Contains(tag.ObjectId)); var tagNode = new TagNode(this, tag.ObjectId, tag.Name, isVisible); var parent = tagNode.CreateRootNode(pathToNodes, (tree, parentPath) => new BasePathNode(tree, parentPath)); if (parent is not null) { nodes.AddNode(parent); } } return(nodes); }
private void FillTagTree(IEnumerable<GitRef> tags) { var nodes = new Dictionary<string, BaseBranchNode>(); var branchFullPaths = new List<string>(); foreach (var tag in tags) { var branchNode = new TagNode(this, tag.Name, tag); var parent = branchNode.CreateRootNode(nodes, (tree, parentPath) => new BasePathNode(tree, parentPath)); if (parent != null) Nodes.AddNode(parent); branchFullPaths.Add(branchNode.FullPath); } FireBranchAddedEvent(branchFullPaths); }