Exemplo n.º 1
0
        public RepositoryGraph Graph(GraphParameters graphParameters)
        {
            var graph   = new RepositoryGraph();
            var commits = new GitVertex[]
            {
                new CommitVertex("c34173273", "Wrote some code")
                {
                    Message = "This is a long form description of the commit"
                },
                new CommitVertex("b1ae7a123", "Initial commit"),
                new CommitVertex("aa3823ca1", "Added readme"),
                new CommitVertex("9e21435fa", "Branching")
                {
                    Message = "This is a long form description of the commit"
                },
                new ReferenceVertex("refs/head/master", "c34173273"),
                new ReferenceVertex("remotes/origin/master", "c34173273"),
            };

            graph.AddVertexRange(commits);
            graph.AddEdge(new GitEdge(commits[1], commits[2], null));
            graph.AddEdge(new GitEdge(commits[0], commits[1], null));
            graph.AddEdge(new GitEdge(commits[3], commits[2], null));
            graph.LayoutAlgorithmType = "EfficientSugiyama";
            return(graph);
        }
Exemplo n.º 2
0
 public void AddVertex(GitVertex vertex)
 {
     if (Vertices.ContainsKey(vertex.Key))
     {
         return;
     }
     Vertices[vertex.Key] = vertex;
 }
Exemplo n.º 3
0
 public void AddVertex(GitVertex vertex)
 {
     if (Vertices.ContainsKey(vertex.Key))
     {
         return;
     }
     Vertices[vertex.Key] = vertex;
 }
Exemplo n.º 4
0
        public RepositoryGraph Graph(GraphParameters graphParameters)
        {
            var graph = new RepositoryGraph();
            var commits = new GitVertex[]
                {
                    new CommitVertex("c34173273", "Wrote some code")
                        {Message = "This is a long form description of the commit"},
                    new CommitVertex("b1ae7a123", "Initial commit"),
                    new CommitVertex("aa3823ca1", "Added readme"),
                    new CommitVertex("9e21435fa", "Branching")
                        {Message = "This is a long form description of the commit"},
                    new ReferenceVertex("refs/head/master", "c34173273"),
                    new ReferenceVertex("remotes/origin/master", "c34173273"),
                };

            graph.AddVertexRange(commits);
            graph.AddEdge(new GitEdge(commits[1], commits[2], null));
            graph.AddEdge(new GitEdge(commits[0], commits[1], null));
            graph.AddEdge(new GitEdge(commits[3], commits[2], null));
            graph.LayoutAlgorithmType = "EfficientSugiyama";
            return graph;
        }
Exemplo n.º 5
0
 public GitEdge(GitVertex source, GitVertex target, string tag)
     : base(source, target, (tag == null ? new string[] {} : new[] { tag }).ToList())
 {
     SourceKey = source.Key;
     TargetKey = target.Key;
 }