69 instantiations of TextChangeRange
Microsoft.CodeAnalysis (19)
Syntax\SyntaxDiffer.cs (7)
535RecordChange(new ChangeRecord(new TextChangeRange(oldSpan, 0), removedNodes, null)); 549RecordChange(new TextChangeRange(oldSpan, newSpan.Length), removedNode, insertedNode); 559RecordChange(new ChangeRecord(new TextChangeRange(oldSpan, newSpan.Length), removedNodes, insertedNodes)); 569RecordChange(new ChangeRecord(new TextChangeRange(new TextSpan(start, 0), newSpan.Length), null, insertedNodes)); 581new TextChangeRange(new TextSpan(last.Range.Span.Start, last.Range.Span.Length + change.Range.Span.Length), last.Range.NewLength + change.Range.NewLength), 604new TextChangeRange(new TextSpan(last.Range.Span.Start, last.Range.Span.Length + textChangeRange.Span.Length), last.Range.NewLength + textChangeRange.NewLength), 762range = new TextChangeRange(
Text\ChangedText.cs (1)
206return ImmutableArray.Create(new TextChangeRange(new TextSpan(0, oldText.Length), _newText.Length));
Text\SourceText.cs (2)
810changeRanges.Add(new TextChangeRange(change.Span, newTextLength)); 890return ImmutableArray.Create(new TextChangeRange(new TextSpan(0, oldText.Length), this.Length));
Text\TextChange.cs (1)
91return new TextChangeRange(change.Span, change.NewText.Length);
Text\TextChangeRange.cs (1)
129return new TextChangeRange(combined, newLen);
Text\TextChangeRangeExtensions.cs (7)
100return new TextChangeRange(TextSpan.FromBounds(currentStart, currentOldEnd), currentNewEnd - currentStart); 105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0); 225addAndAdjustOldDelta(builder, ref oldDelta, new TextChangeRange(new TextSpan(oldChange.Span.Start, oldChangeLeadingDeletion), oldChangeLeadingInsertion)); 226oldChange = new TextChangeRange(new TextSpan(newChange.SpanStart - oldDelta, oldChange.Span.Length - oldChangeLeadingDeletion), oldChange.NewLength - oldChangeLeadingInsertion); 261oldChange = new TextChangeRange(oldChange.Span, oldChange.NewLength - newChange.SpanLength); 380add(builder, new TextChangeRange(new TextSpan(newChange.SpanStart - oldDelta, newChange.SpanLength), newChange.NewLength)); 391builder[^1] = new TextChangeRange(new TextSpan(last.Span.Start, last.Span.Length + change.Span.Length), last.NewLength + change.NewLength);
Microsoft.CodeAnalysis.CodeStyle (7)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (7)
100return new TextChangeRange(TextSpan.FromBounds(currentStart, currentOldEnd), currentNewEnd - currentStart); 105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0); 225addAndAdjustOldDelta(builder, ref oldDelta, new TextChangeRange(new TextSpan(oldChange.Span.Start, oldChangeLeadingDeletion), oldChangeLeadingInsertion)); 226oldChange = new TextChangeRange(new TextSpan(newChange.SpanStart - oldDelta, oldChange.Span.Length - oldChangeLeadingDeletion), oldChange.NewLength - oldChangeLeadingInsertion); 261oldChange = new TextChangeRange(oldChange.Span, oldChange.NewLength - newChange.SpanLength); 380add(builder, new TextChangeRange(new TextSpan(newChange.SpanStart - oldDelta, newChange.SpanLength), newChange.NewLength)); 391builder[^1] = new TextChangeRange(new TextSpan(last.Span.Start, last.Span.Length + change.Span.Length), last.NewLength + change.NewLength);
Microsoft.CodeAnalysis.CSharp (1)
Syntax\CSharpSyntaxTree.cs (1)
550return this.WithChanges(newText, new[] { new TextChangeRange(new TextSpan(0, this.Length), newText.Length) });
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\TopLevelStatementsTests.cs (1)
8791(CSharpSyntaxNode)oldTree.GetRoot(), new[] { new TextChangeRange(new TextSpan(282, 0), 1) });
Microsoft.CodeAnalysis.EditorFeatures (1)
Shared\Extensions\TextChangeExtensions.cs (1)
13=> new(textChange.OldSpan.ToTextSpan(), textChange.NewLength);
Microsoft.CodeAnalysis.EditorFeatures.Text (5)
Extensions.SnapshotSourceText.cs (2)
303return [new TextChangeRange(new TextSpan(0, oldText.Length), this.Length)]; 354return ImmutableArray.Create(new TextChangeRange(new TextSpan(0, oldTextLength), this.Length));
Extensions.TextBufferContainer.cs (1)
113var changes = ImmutableArray.CreateRange(args.Changes.Select(c => new TextChangeRange(new TextSpan(c.OldSpan.Start, c.OldSpan.Length), c.NewLength)));
ITextImageHelpers.cs (2)
109return new TextChangeRange(new TextSpan(change.OldSpan.Start, change.OldSpan.Length), change.NewLength); 113return new TextChangeRange(new TextSpan(change.NewSpan.Start, change.NewSpan.Length), change.OldLength);
Microsoft.CodeAnalysis.UnitTests (25)
Text\TextChangeRangeTest.cs (10)
20() => { var notUsed = new TextChangeRange(new TextSpan(), -1); }); 27var range = new TextChangeRange(span, 42); 38EqualityUnit.Create(new TextChangeRange()).WithEqualValues(new TextChangeRange()), 39EqualityUnit.Create(new TextChangeRange(new TextSpan(42, 2), 13)).WithEqualValues(new TextChangeRange(new TextSpan(42, 2), 13)), 40EqualityUnit.Create(new TextChangeRange(new TextSpan(42, 2), 13)).WithNotEqualValues(new TextChangeRange(new TextSpan(42, 2), 5)), 41EqualityUnit.Create(new TextChangeRange(new TextSpan(42, 2), 13)).WithNotEqualValues(new TextChangeRange(new TextSpan(42, 4), 13)));
Text\TextChangeTests.cs (15)
926new TextChangeRange(new TextSpan(919, 10), 466), 927new TextChangeRange(new TextSpan(936, 33), 29), 928new TextChangeRange(new TextSpan(1098, 0), 70), 929new TextChangeRange(new TextSpan(1125, 4), 34), 930new TextChangeRange(new TextSpan(1138, 0), 47)); 932new TextChangeRange(new TextSpan(997, 0), 2), 933new TextChangeRange(new TextSpan(1414, 0), 2), 934new TextChangeRange(new TextSpan(1419, 0), 2), 935new TextChangeRange(new TextSpan(1671, 5), 5), 936new TextChangeRange(new TextSpan(1681, 0), 4)); 941new TextChangeRange(new TextSpan(919, 10), 468), 942new TextChangeRange(new TextSpan(936, 33), 33), 943new TextChangeRange(new TextSpan(1098, 0), 70), 944new TextChangeRange(new TextSpan(1125, 4), 38), 945new TextChangeRange(new TextSpan(1138, 0), 47));
Microsoft.CodeAnalysis.VisualBasic (2)
Scanner\Blender.vb (1)
222_affectedRange = New TextChangeRange(span, span.Length - _change.Span.Length + _change.NewLength)
Syntax\VisualBasicSyntaxTree.vb (1)
108Return Me.WithChanges(newText, {New TextChangeRange(New TextSpan(0, Me.Length), newText.Length)})
Microsoft.CodeAnalysis.Workspaces (8)
Classification\SyntaxClassification\SyntacticChangeRangeComputer.cs (1)
113return new TextChangeRange(
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (7)
100return new TextChangeRange(TextSpan.FromBounds(currentStart, currentOldEnd), currentNewEnd - currentStart); 105return new TextChangeRange(textChange.Span, textChange.NewText?.Length ?? 0); 225addAndAdjustOldDelta(builder, ref oldDelta, new TextChangeRange(new TextSpan(oldChange.Span.Start, oldChangeLeadingDeletion), oldChangeLeadingInsertion)); 226oldChange = new TextChangeRange(new TextSpan(newChange.SpanStart - oldDelta, oldChange.Span.Length - oldChangeLeadingDeletion), oldChange.NewLength - oldChangeLeadingInsertion); 261oldChange = new TextChangeRange(oldChange.Span, oldChange.NewLength - newChange.SpanLength); 380add(builder, new TextChangeRange(new TextSpan(newChange.SpanStart - oldDelta, newChange.SpanLength), newChange.NewLength)); 391builder[^1] = new TextChangeRange(new TextSpan(last.Span.Start, last.Span.Length + change.Span.Length), last.NewLength + change.NewLength);
185 references to TextChangeRange
Microsoft.CodeAnalysis (76)
Syntax\SyntaxDiffer.cs (6)
518public readonly TextChangeRange Range; 522internal ChangeRecord(TextChangeRange range, Queue<SyntaxNodeOrToken>? oldNodes, Queue<SyntaxNodeOrToken>? newNodes) 593private void RecordChange(TextChangeRange textChangeRange, in SyntaxNodeOrToken removedNode, SyntaxNodeOrToken insertedNode) 728public readonly TextChangeRange Range; 731public ChangeRangeWithText(TextChangeRange range, string? newText) 750var range = cr.Range;
Syntax\SyntaxTreeExtensions.cs (2)
20internal static void VerifySource(this SyntaxTree tree, IEnumerable<TextChangeRange>? changes = null) 31var change = TextChangeRange.Collapse(changes).Span;
Text\ChangedText.cs (16)
19public ChangedText(SourceText oldText, SourceText newText, ImmutableArray<TextChangeRange> changeRanges) 34SourceText oldText, SourceText newText, ImmutableArray<TextChangeRange> changeRanges) 37foreach (var change in changeRanges) 44foreach (var change in changeRanges) 61public ImmutableArray<TextChangeRange> ChangeRanges { get; } 69public ChangeInfo(ImmutableArray<TextChangeRange> changeRanges, WeakReference<SourceText> weakOldText, ChangeInfo? previous) 107public IEnumerable<TextChangeRange> Changes 169public override IReadOnlyList<TextChangeRange> GetChangeRanges(SourceText oldText) 178return TextChangeRange.NoChanges; 223private static IReadOnlyList<ImmutableArray<TextChangeRange>> GetChangesBetween(SourceText oldText, ChangedText newText) 225var list = new List<ImmutableArray<TextChangeRange>>(); 252private static ImmutableArray<TextChangeRange> Merge(IReadOnlyList<ImmutableArray<TextChangeRange>> changeSets) 270public static ImmutableArray<TextChangeRange> Merge(ImmutableArray<TextChangeRange> oldChanges, ImmutableArray<TextChangeRange> newChanges)
Text\SourceText.cs (5)
761var changeRanges = ArrayBuilder<TextChangeRange>.GetInstance(); 873/// Gets the set of <see cref="TextChangeRange"/> that describe how the text changed 877public virtual IReadOnlyList<TextChangeRange> GetChangeRanges(SourceText oldText) 886return TextChangeRange.NoChanges; 906foreach (var range in ranges)
Text\TextChange.cs (2)
85/// Converts a <see cref="TextChange"/> to a <see cref="TextChangeRange"/>. 88public static implicit operator TextChangeRange(TextChange change)
Text\TextChangeEventArgs.cs (4)
24public TextChangeEventArgs(SourceText oldText, SourceText newText, IEnumerable<TextChangeRange> changes) 42public TextChangeEventArgs(SourceText oldText, SourceText newText, params TextChangeRange[] changes) 43: this(oldText, newText, (IEnumerable<TextChangeRange>)changes) 60public IReadOnlyList<TextChangeRange> Changes { get; }
Text\TextChangeRange.cs (20)
16public readonly struct TextChangeRange : IEquatable<TextChangeRange> 31/// Initializes a new instance of <see cref="TextChangeRange"/>. 48/// Compares current instance of <see cref="TextChangeRange"/> to another. 50public bool Equals(TextChangeRange other) 58/// Compares current instance of <see cref="TextChangeRange"/> to another. 62return obj is TextChangeRange range && Equals(range); 66/// Provides hash code for current instance of <see cref="TextChangeRange"/>. 75/// Determines if two instances of <see cref="TextChangeRange"/> are same. 77public static bool operator ==(TextChangeRange left, TextChangeRange right) 83/// Determines if two instances of <see cref="TextChangeRange"/> are different. 85public static bool operator !=(TextChangeRange left, TextChangeRange right) 93public static IReadOnlyList<TextChangeRange> NoChanges => SpecializedCollections.EmptyReadOnlyList<TextChangeRange>(); 96/// Collapse a set of <see cref="TextChangeRange"/>s into a single encompassing range. If 99public static TextChangeRange Collapse(IEnumerable<TextChangeRange> changes) 105foreach (var change in changes) 123return default(TextChangeRange);
Text\TextChangeRangeExtensions.cs (21)
16public static TextChangeRange? Accumulate(this TextChangeRange? accumulatedTextChangeSoFar, IReadOnlyList<TextChangeRange> changesInNextVersion) 27var newChange = changesInNextVersion.Count == 1 29: TextChangeRange.Collapse(changesInNextVersion); 103public static TextChangeRange ToTextChangeRange(this TextChange textChange) 117public static ImmutableArray<TextChangeRange> Merge(ImmutableArray<TextChangeRange> oldChanges, ImmutableArray<TextChangeRange> newChanges) 130var builder = ArrayBuilder<TextChangeRange>.GetInstance(); 132var oldChange = oldChanges[0]; 370static void addAndAdjustOldDelta(ArrayBuilder<TextChangeRange> builder, ref int oldDelta, TextChangeRange oldChange) 377static void adjustAndAddNewChange(ArrayBuilder<TextChangeRange> builder, int oldDelta, UnadjustedNewChange newChange) 383static void add(ArrayBuilder<TextChangeRange> builder, TextChangeRange change) 387var last = builder[^1]; 406/// Represents a new change being processed by <see cref="Merge(ImmutableArray&lt;TextChangeRange&gt;, ImmutableArray&lt;TextChangeRange&gt;)"/>. 429public UnadjustedNewChange(TextChangeRange range) 435private static int NewEnd(this TextChangeRange range) => range.Span.Start + range.NewLength;
Microsoft.CodeAnalysis.CodeStyle (23)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (2)
20internal static void VerifySource(this SyntaxTree tree, IEnumerable<TextChangeRange>? changes = null) 31var change = TextChangeRange.Collapse(changes).Span;
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (21)
16public static TextChangeRange? Accumulate(this TextChangeRange? accumulatedTextChangeSoFar, IReadOnlyList<TextChangeRange> changesInNextVersion) 27var newChange = changesInNextVersion.Count == 1 29: TextChangeRange.Collapse(changesInNextVersion); 103public static TextChangeRange ToTextChangeRange(this TextChange textChange) 117public static ImmutableArray<TextChangeRange> Merge(ImmutableArray<TextChangeRange> oldChanges, ImmutableArray<TextChangeRange> newChanges) 130var builder = ArrayBuilder<TextChangeRange>.GetInstance(); 132var oldChange = oldChanges[0]; 370static void addAndAdjustOldDelta(ArrayBuilder<TextChangeRange> builder, ref int oldDelta, TextChangeRange oldChange) 377static void adjustAndAddNewChange(ArrayBuilder<TextChangeRange> builder, int oldDelta, UnadjustedNewChange newChange) 383static void add(ArrayBuilder<TextChangeRange> builder, TextChangeRange change) 387var last = builder[^1]; 406/// Represents a new change being processed by <see cref="Merge(ImmutableArray&lt;TextChangeRange&gt;, ImmutableArray&lt;TextChangeRange&gt;)"/>. 429public UnadjustedNewChange(TextChangeRange range) 435private static int NewEnd(this TextChangeRange range) => range.Span.Start + range.NewLength;
Microsoft.CodeAnalysis.CSharp (15)
Parser\Blender.cs (9)
19private readonly ImmutableStack<TextChangeRange> _changes; 35public Blender(Lexer lexer, CSharp.CSharpSyntaxNode oldTree, IEnumerable<TextChangeRange> changes) 39_changes = ImmutableStack.Create<TextChangeRange>(); 56var collapsed = TextChangeRange.Collapse(changes); 61var affectedRange = ExtendToAffectedRange(oldTree, collapsed); 86ImmutableStack<TextChangeRange> changes, 111private static TextChangeRange ExtendToAffectedRange( 113TextChangeRange changeRange)
Parser\Blender.Reader.cs (2)
19private ImmutableStack<TextChangeRange> _changes; 131var change = _changes.Peek();
Parser\LanguageParser.cs (1)
40IEnumerable<TextChangeRange>? changes,
Parser\SyntaxParser.cs (1)
55IEnumerable<TextChangeRange> changes,
Syntax\CSharpSyntaxTree.cs (2)
553private SyntaxTree WithChanges(SourceText newText, IReadOnlyList<TextChangeRange> changes) 560IReadOnlyList<TextChangeRange>? workingChanges = changes;
Microsoft.CodeAnalysis.EditorFeatures (6)
Classification\Semantic\AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs (2)
172var collapsedRange = TextChangeRange.Collapse(textChangeRanges);
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (3)
369private ValueTask<TextChangeRange?> ComputeChangedRangeAsync( 379return ValueTaskFactory.FromResult<TextChangeRange?>(null); 387return ValueTaskFactory.FromResult<TextChangeRange?>(null);
Shared\Extensions\TextChangeExtensions.cs (1)
12public static TextChangeRange ToTextChangeRange(this ITextChange textChange)
Microsoft.CodeAnalysis.EditorFeatures.Text (17)
Extensions.SnapshotSourceText.cs (6)
288public override IReadOnlyList<TextChangeRange> GetChangeRanges(SourceText oldText) 298return TextChangeRange.NoChanges; 318public override IReadOnlyList<TextChangeRange> GetChangeRanges(SourceText oldText) 328return TextChangeRange.NoChanges; 346private IReadOnlyList<TextChangeRange> GetChangeRanges(ITextImage? oldImage, int oldTextLength, ITextImage? newImage) 359return TextChangeRange.NoChanges;
ITextImageHelpers.cs (11)
20private static readonly Func<ITextChange, TextChangeRange> s_forwardTextChangeRange = c => CreateTextChangeRange(c, forward: true); 21private static readonly Func<ITextChange, TextChangeRange> s_backwardTextChangeRange = c => CreateTextChangeRange(c, forward: false); 23public static IReadOnlyList<TextChangeRange> GetChangeRanges(ITextImage oldImage, ITextImage newImage) 26public static IReadOnlyList<TextChangeRange> GetChangeRanges(ITextImageVersion oldImageVersion, ITextImageVersion newImageVersion) 57var builder = new FixedSizeArrayBuilder<TextChangeRange>(changes.Count); 67private static TextChangeRange GetChangeRanges(ITextImageVersion oldVersion, ITextImageVersion newVersion, bool forward) 69TextChangeRange? range = null; 70using var _ = ArrayBuilder<ArrayBuilder<TextChangeRange>>.GetInstance(out var builder); 87ArrayBuilder<ArrayBuilder<TextChangeRange>> builder) 91var changes = ArrayBuilder<TextChangeRange>.GetInstance(version.Changes.Count); 105private static TextChangeRange CreateTextChangeRange(ITextChange change, bool forward)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
Classification\ClassificationTests.vb (3)
359Public Function ComputeSyntacticChangeRangeAsync(oldDocument As Document, newDocument As Document, timeout As TimeSpan, cancellationToken As CancellationToken) As ValueTask(Of TextChangeRange?) Implements IClassificationService.ComputeSyntacticChangeRangeAsync 360Return New ValueTask(Of TextChangeRange?) 363Public Function ComputeSyntacticChangeRange(services As SolutionServices, oldRoot As SyntaxNode, newRoot As SyntaxNode, timeout As TimeSpan, cancellationToken As CancellationToken) As TextChangeRange? Implements IClassificationService.ComputeSyntacticChangeRange
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
Internal\Classification\FSharpClassificationService.cs (2)
72public TextChangeRange? ComputeSyntacticChangeRange(SolutionServices services, SyntaxNode oldRoot, SyntaxNode newRoot, TimeSpan timeout, CancellationToken cancellationToken) 78public ValueTask<TextChangeRange?> ComputeSyntacticChangeRangeAsync(Document oldDocument, Document newDocument, TimeSpan timeout, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Features (2)
SolutionCrawler\AbstractDocumentDifferenceService.cs (2)
104ISyntaxFactsService syntaxFactsService, SyntaxNode oldRoot, SyntaxNode newRoot, TextChangeRange range) 138ISyntaxFactsService syntaxFactsService, SyntaxNode oldRoot, SyntaxNode newRoot, TextChangeRange range)
Microsoft.CodeAnalysis.UnitTests (3)
Text\TextChangeRangeTest.cs (2)
20() => { var notUsed = new TextChangeRange(new TextSpan(), -1); }); 27var range = new TextChangeRange(span, 42);
Text\TextChangeTests.cs (1)
946Assert.Equal<TextChangeRange>(expected, merged);
Microsoft.CodeAnalysis.VisualBasic (5)
Scanner\Blender.vb (4)
27Private ReadOnly _change As TextChangeRange 32Private ReadOnly _affectedRange As TextChangeRange 185changes As TextChangeRange(), 206_change = TextChangeRange.Collapse(changes)
Syntax\VisualBasicSyntaxTree.vb (1)
114Private Function WithChanges(newText As SourceText, changes As TextChangeRange()) As SyntaxTree
Microsoft.CodeAnalysis.Workspaces (33)
Classification\AbstractClassificationService.cs (2)
229public ValueTask<TextChangeRange?> ComputeSyntacticChangeRangeAsync(Document oldDocument, Document newDocument, TimeSpan timeout, CancellationToken cancellationToken) 232public TextChangeRange? ComputeSyntacticChangeRange(SolutionServices services, SyntaxNode oldRoot, SyntaxNode newRoot, TimeSpan timeout, CancellationToken cancellationToken)
Classification\IClassificationService.cs (2)
103ValueTask<TextChangeRange?> ComputeSyntacticChangeRangeAsync( 111TextChangeRange? ComputeSyntacticChangeRange(
Classification\SyntaxClassification\AbstractSyntaxClassificationService.cs (1)
60public TextChangeRange? ComputeSyntacticChangeRange(SyntaxNode oldRoot, SyntaxNode newRoot, TimeSpan timeout, CancellationToken cancellationToken)
Classification\SyntaxClassification\ISyntaxClassificationService.cs (1)
59TextChangeRange? ComputeSyntacticChangeRange(
Classification\SyntaxClassification\SyntacticChangeRangeComputer.cs (1)
41public static TextChangeRange ComputeSyntacticChangeRange(SyntaxNode oldRoot, SyntaxNode newRoot, TimeSpan timeout, CancellationToken cancellationToken)
Shared\Extensions\SourceTextExtensions.cs (2)
61public static TextChangeRange GetEncompassingTextChangeRange(this SourceText newText, SourceText oldText) 75return TextChangeRange.Collapse(ranges);
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (2)
20internal static void VerifySource(this SyntaxTree tree, IEnumerable<TextChangeRange>? changes = null) 31var change = TextChangeRange.Collapse(changes).Span;
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (21)
16public static TextChangeRange? Accumulate(this TextChangeRange? accumulatedTextChangeSoFar, IReadOnlyList<TextChangeRange> changesInNextVersion) 27var newChange = changesInNextVersion.Count == 1 29: TextChangeRange.Collapse(changesInNextVersion); 103public static TextChangeRange ToTextChangeRange(this TextChange textChange) 117public static ImmutableArray<TextChangeRange> Merge(ImmutableArray<TextChangeRange> oldChanges, ImmutableArray<TextChangeRange> newChanges) 130var builder = ArrayBuilder<TextChangeRange>.GetInstance(); 132var oldChange = oldChanges[0]; 370static void addAndAdjustOldDelta(ArrayBuilder<TextChangeRange> builder, ref int oldDelta, TextChangeRange oldChange) 377static void adjustAndAddNewChange(ArrayBuilder<TextChangeRange> builder, int oldDelta, UnadjustedNewChange newChange) 383static void add(ArrayBuilder<TextChangeRange> builder, TextChangeRange change) 387var last = builder[^1]; 406/// Represents a new change being processed by <see cref="Merge(ImmutableArray&lt;TextChangeRange&gt;, ImmutableArray&lt;TextChangeRange&gt;)"/>. 429public UnadjustedNewChange(TextChangeRange range) 435private static int NewEnd(this TextChangeRange range) => range.Span.Start + range.NewLength;
Workspace\Solution\DocumentState.cs (1)
264var change = newText.GetEncompassingTextChangeRange(oldText);