Beispiel #1
0
        public void AddParent(RevisionGraphRevision parent, out int maxScore)
        {
            // Generate a LaneColor used for rendering
            if (!Parents.IsEmpty)
            {
                parent.LaneColor = parent.Score;
            }
            else
            {
                if (parent.LaneColor == -1)
                {
                    parent.LaneColor = LaneColor;
                }
            }

            if (IsRelative)
            {
                parent.MakeRelative();
            }

            ImmutableInterlocked.Push(ref _parents, parent);
            parent.AddChild(this);

            maxScore = parent.EnsureScoreIsAbove(Score + 1);

            StartSegments.Add(new RevisionGraphSegment(parent, this));
        }
Beispiel #2
0
        public void AddParent(RevisionGraphRevision parent, out int maxScore)
        {
            // Generate a LaneColor used for rendering
            if (Parents.Any())
            {
                parent.LaneColor = parent.Score;
            }
            else
            {
                if (parent.LaneColor == -1)
                {
                    parent.LaneColor = LaneColor;
                }
            }

            if (IsRelative)
            {
                parent.MakeRelative();
            }

            Parents.Add(parent);
            parent.AddChild(this);

            maxScore = parent.EnsureScoreIsAbove(Score + 1);

            StartSegments.Add(new RevisionGraphSegment(parent, this));
        }
        public void AddParent(RevisionGraphRevision parent, out int maxScore)
        {
            if (IsRelative)
            {
                parent.MakeRelative();
            }

            ImmutableInterlocked.Push(ref _parents, parent);
            parent.AddChild(this);

            maxScore = parent.EnsureScoreIsAbove(Score + 1);

            StartSegments.Add(new RevisionGraphSegment(parent, this));
        }