示例#1
0
        public void AddLine(DiffLine line)
        {
            switch (line.LineChangeType)
            {
                case LineChangeType.Add:
                    NewLineNumber++;
                    line.NewLineNumber = NewLineNumber;

                    break;
                case LineChangeType.Delete:
                    OldLineNumber++;
                    line.OldLineNumber = OldLineNumber;

                    break;
                default:
                    NewLineNumber++;
                    OldLineNumber++;

                    line.NewLineNumber = NewLineNumber;
                    line.OldLineNumber = OldLineNumber;

                    break;
            }

            Lines.Add(line);
        }
示例#2
0
        public void AddLine(DiffLine line)
        {
            switch (line.LineChangeType)
            {
            case LineChangeType.Add:
                NewLineNumber++;
                line.NewLineNumber = NewLineNumber;

                break;

            case LineChangeType.Delete:
                OldLineNumber++;
                line.OldLineNumber = OldLineNumber;

                break;

            default:
                NewLineNumber++;
                OldLineNumber++;

                line.NewLineNumber = NewLineNumber;
                line.OldLineNumber = OldLineNumber;

                break;
            }

            Lines.Add(line);
        }