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\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)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.EditorFeatures.Text (5)
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)
Microsoft.CodeAnalysis.Workspaces (8)
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)
Microsoft.CodeAnalysis.CodeStyle (23)
Microsoft.CodeAnalysis.CSharp (15)
Microsoft.CodeAnalysis.EditorFeatures (6)
Microsoft.CodeAnalysis.EditorFeatures.Text (17)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic (5)
Microsoft.CodeAnalysis.Workspaces (33)