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); }