Example #1
0
        NamedGroup GroupCommitsBySha(List <CommitNodeModel> models, int key)
        {
            int k = key;

            models.ForEach(b => Items.Add(b));
            var bcsg = new NamedGroup()
            {
                Header = "By commit SHA", MatchingText = tb.Text
            };
            var bcsgItems = models.Select(c => new Tuple <int, string>(k++, c.Sha.Substring(tb.Text.Length)));

            key        = k;
            bcsg.Items = bcsgItems;
            return(bcsg);
        }
Example #2
0
        NamedGroup GroupBranches(List <BranchLabelModel> models, int key)
        {
            int k = key;

            models.ForEach(b => Items.Add(b));
            var bbng = new NamedGroup()
            {
                Header = "By branch name", MatchingText = tb.Text
            };
            var bbngItems = models.Select(b => new Tuple <int, string>(k++, b.Name.Substring(tb.Text.Length)));

            key        = k;
            bbng.Items = bbngItems;
            return(bbng);
        }