/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45/**6* Represents information about a specific difference between two sequences.7*/8export class DiffChange {910/**11* The position of the first element in the original sequence which12* this change affects.13*/14public originalStart: number;1516/**17* The number of elements from the original sequence which were18* affected.19*/20public originalLength: number;2122/**23* The position of the first element in the modified sequence which24* this change affects.25*/26public modifiedStart: number;2728/**29* The number of elements from the modified sequence which were30* affected (added).31*/32public modifiedLength: number;3334/**35* Constructs a new DiffChange with the given sequence information36* and content.37*/38constructor(originalStart: number, originalLength: number, modifiedStart: number, modifiedLength: number) {39//Debug.Assert(originalLength > 0 || modifiedLength > 0, "originalLength and modifiedLength cannot both be <= 0");40this.originalStart = originalStart;41this.originalLength = originalLength;42this.modifiedStart = modifiedStart;43this.modifiedLength = modifiedLength;44}4546/**47* The end point (exclusive) of the change in the original sequence.48*/49public getOriginalEnd() {50return this.originalStart + this.originalLength;51}5253/**54* The end point (exclusive) of the change in the modified sequence.55*/56public getModifiedEnd() {57return this.modifiedStart + this.modifiedLength;58}59}606162