8 overrides of Length
Microsoft.CodeAnalysis (6)
Text\ChangedText.cs (1)
113public override int Length
Text\CompositeText.cs (1)
52public override int Length
Text\LargeText.cs (1)
153public override int Length => _length;
Text\StringBuilderText.cs (1)
49public override int Length
Text\StringText.cs (1)
47public override int Length => _source.Length;
Text\SubText.cs (1)
41public override int Length => UnderlyingSpan.Length;
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.SnapshotSourceText.cs (1)
123public override int Length
Microsoft.CodeAnalysis.Test.Utilities (1)
Syntax\SourceUtilities.cs (1)
29public override int Length
239 references to Length
Microsoft.CodeAnalysis (67)
EmbeddedText.cs (2)
303maxByteCount = text.Encoding.GetMaxByteCount(text.Length); 319using (var writer = new StreamWriter(builder, text.Encoding, bufferSize: Math.Max(1, text.Length), leaveOpen: true))
InternalUtilities\AdditionalTextComparer.cs (2)
45if (xText is null || yText is null || xText.Length != yText.Length)
Syntax\SyntaxDiffer.cs (1)
81return new[] { new TextSpan(0, after!.GetText().Length) };
Syntax\SyntaxTreeExtensions.cs (2)
24var fullSpan = new TextSpan(0, text.Length); 69if (index < text.Length)
Text\ChangedText.cs (10)
41if (oldText.Length + deltaLength != newText.Length) 50if (change.Span.Start > oldText.Length) 53if (change.Span.End > oldText.Length) 115get { return _newText.Length; } 207return ImmutableArray.Create(new TextChangeRange(new TextSpan(0, oldText.Length), _newText.Length)); 315if (endsWithCR && change.Span.Start < oldText.Length && oldText[change.Span.Start] == '\n') 348if (position < oldText.Length) 357var lps = oldLineInfo.GetLinePositionSpan(TextSpan.FromBounds(position, oldText.Length));
Text\CompositeText.cs (10)
43offset += _segments[i].Length; 95var copyLength = Math.Min(count, segment.Length - segOffset); 153var copyLength = Math.Min(count, segment.Length - segOffset); 254if (segments[i].Length <= segmentSize) 260if (segments[j].Length <= segmentSize) 285if (segments[i].Length <= segmentSize) 287int combinedLength = segments[i].Length; 293if (segments[j].Length <= segmentSize) 296combinedLength += segments[j].Length; 337length += segment.Length;
Text\SourceText.cs (24)
396get { return this.Length; } 451/// greater than <see cref="Length"/>.</exception> 479if (span.End > this.Length) 497else if (spanLength == this.Length && span.Start == 0) 512if (start < 0 || start > this.Length) 523return this.GetSubText(new TextSpan(start, this.Length - start)); 532this.Write(textWriter, new TextSpan(0, this.Length), cancellationToken); 603return ToString(new TextSpan(0, this.Length)); 618int position = Math.Max(Math.Min(span.Start, this.Length), 0); 619int length = Math.Min(span.End, this.Length) - position; 621while (position < this.Length && length > 0) 658if (change.Span.End > this.Length) 709if (position < this.Length) 711var subText = this.GetSubText(new TextSpan(position, this.Length - position)); 780return ImmutableArray.Create(new TextChangeRange(new TextSpan(0, oldText.Length), this.Length)); 878return TextLine.FromSpan(_text, TextSpan.FromBounds(start, _text.Length)); 890if (position < 0 || position > _text.Length) 938var length = this.Length; 956if (0 == this.Length) 1060if (this.Length != other.Length) 1070while (position < this.Length) 1072int n = Math.Min(this.Length - position, buffer1.Length);
Text\SourceTextComparer.cs (1)
39return Hash.Combine(obj.Length,
Text\SourceTextStream.cs (3)
41_charBuffer = new char[Math.Min(bufferSize, _source.Length)]; 97while (count >= _minimumTargetBufferCount && _position < _source.Length) 134int charsToRead = Math.Min(_charBuffer.Length, _source.Length - _sourceOffset);
Text\SubText.cs (4)
24|| span.Start >= text.Length 26|| span.End > text.Length) 88int compositeStart = Math.Min(UnderlyingText.Length, UnderlyingSpan.Start + start); 89int compositeEnd = Math.Min(UnderlyingText.Length, compositeStart + length);
Text\TextLine.cs (7)
40if (span.Start > text.Length || span.Start < 0 || span.End > text.Length) 45if (text.Length > 0) 59if (!endIncludesLineBreak && span.End < text.Length) 71if (span.End < text.Length && !endIncludesLineBreak) 123if (_text == null || _text.Length == 0 || _endIncludingBreaks == _start) 161if (_text == null || _text.Length == 0)
Text\TextUtilities.cs (1)
35return (next < text.Length) && '\n' == text[next] ? 2 : 1;
Microsoft.CodeAnalysis.CodeStyle (3)
AbstractVirtualCharService.ITextInfo.cs (1)
24public readonly int Length(SourceText text) => text.Length;
J\s\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
24var fullSpan = new TextSpan(0, text.Length); 69if (index < text.Length)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
ParsedDocument.cs (1)
84textChanges.Count == 1 && textChanges[0].Span != new TextSpan(0, oldDocument.Text.Length))
Microsoft.CodeAnalysis.CSharp (9)
Parser\Lexer.cs (3)
918int end = TextWindow.Text.Length; 2425if ((position + s_conflictMarkerLength) <= text.Length) 2440return (position + s_conflictMarkerLength) < text.Length &&
Parser\SlidingTextWindow.cs (2)
68_textEnd = text.Length; 183int amountToRead = Math.Min(_text.Length, position + _characterWindow.Length) - position;
Parser\SyntaxParser.cs (1)
125var size = Math.Min(4096, Math.Max(32, this.lexer.TextWindow.Text.Length / 2));
Syntax\CSharpSyntaxTree.cs (2)
550return this.WithChanges(newText, new[] { new TextChangeRange(new TextSpan(0, this.Length), newText.Length) }); 564if (workingChanges.Count == 1 && workingChanges[0].Span == new TextSpan(0, this.Length) && workingChanges[0].NewLength == newText.Length)
Syntax\CSharpSyntaxTree.LazySyntaxTree.cs (1)
62get { return _text.Length; }
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
ArrowExpressionClausePlacementCodeFixProvider.cs (2)
89while (end < text.Length && text[end] == ' ') 92if (end < text.Length && SyntaxFacts.IsNewLine(text[end]))
ConditionalExpressionPlacementCodeFixProvider.cs (2)
91while (end < text.Length && text[end] == ' ') 94if (end < text.Length && SyntaxFacts.IsNewLine(text[end]))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
StringCopyPaste\StringCopyPasteCommandHandler.cs (1)
311if (newTextAfterChanges.Length != snapshotAfterPaste.Length)
StringCopyPaste\StringCopyPasteHelpers.cs (1)
33=> index >= 0 && index < text.Length ? text[index] : '\0';
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (6)
64await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, document, new TextSpan(0, document.GetTextAsync().Result.Length)); 92await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(ideEngineWorkspace, ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length)); 128return await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, document, new TextSpan(0, document.GetTextAsync().Result.Length)); 174await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, sourceDocument, new TextSpan(0, sourceDocument.GetTextAsync().Result.Length)); 206var diagnostics = await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length)); 262var diagnostics = await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(ideEngineWorkspace, ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length));
Microsoft.CodeAnalysis.CSharp.Features (6)
ArrowExpressionClausePlacementCodeFixProvider.cs (2)
89while (end < text.Length && text[end] == ' ') 92if (end < text.Length && SyntaxFacts.IsNewLine(text[end]))
Completion\CompletionProviders\CompletionUtilities.cs (1)
137=> ch == ' ' && (characterPosition == text.Length - 1 || !IsWordStartCharacter(text[characterPosition + 1]));
ConditionalExpressionPlacementCodeFixProvider.cs (2)
91while (end < text.Length && text[end] == ' ') 94if (end < text.Length && SyntaxFacts.IsNewLine(text[end]))
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
233if (position >= syntaxTree.GetText(cancellationToken).Length)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\BindingAwaitTests.cs (1)
27TextSpan span = new TextSpan(text.Length, 0);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\Metadata\MetadataTypeTests.cs (2)
363var span = new TextSpan(oldIText.Length, 0); 378span = new TextSpan(oldIText.Length, 0);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (8)
Diagnostics\LocationsTests.cs (3)
400Assert.InRange(diag.Location.SourceSpan.End, diag.Location.SourceSpan.Start, syntaxTree.GetText().Length); 465Assert.InRange(diag.Location.SourceSpan.Start, 0, syntaxTree.GetText().Length); 466Assert.InRange(diag.Location.SourceSpan.End, 0, syntaxTree.GetText().Length);
IncrementalParsing\IncrementalParsingTests.cs (4)
2441oldText.Length, 2525var span = new TextSpan(oldIText.Length, 0); 2539span = new TextSpan(oldIText.Length, 0); 3352var newText = oldText.WithChanges(new TextChange(new TextSpan(oldText.Length, 0), newChar.ToString()));
Syntax\Mocks\MockCSharpSyntaxTree.cs (1)
47=> _sourceText.Length;
Microsoft.CodeAnalysis.EditorFeatures (6)
CommentSelection\ToggleBlockCommentCommandHandler.cs (1)
58closeIdx = allText.Length - commentInfo.BlockCommentEndString.Length;
EditorConfigSettings\Updater\NamingStyles\SourceTextExtensions.cs (1)
46var span = new TextSpan(sourceText.Length, 0);
EditorConfigSettings\Updater\SettingsUpdateHelper.cs (1)
349var result = editorConfigText.WithChanges(new TextChange(new TextSpan(editorConfigText.Length, 0), prefix + newEntry));
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (1)
568if (textChanges.Count != 1 || textChanges[0].Span != new TextSpan(0, oldText.Length))
Remote\SolutionChecksumUpdater.cs (1)
209if (textChanges.Count == 1 && textChanges[0].Span.Length == oldText.Length)
RenameTracking\RenameTrackingTaggerProvider.StateMachine.cs (1)
187while (rightSidePosition < beforeText.Length && IsTrackableCharacter(syntaxFactsService, beforeText[rightSidePosition]))
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
BracePairs\AbstractBracePairsTests.cs (1)
37await service.AddBracePairsAsync(document, new TextSpan(0, text.Length), bracePairs, CancellationToken.None);
ReassignedVariable\AbstractReassignedVariableTests.cs (1)
32var result = await service.GetLocationsAsync(document, new TextSpan(0, text.Length), CancellationToken.None);
Microsoft.CodeAnalysis.EditorFeatures.Text (2)
Extensions.SnapshotSourceText.cs (2)
304return new[] { new TextChangeRange(new TextSpan(0, oldText.Length), this.Length) }; 344return GetChangeRanges(oldSnapshot, oldText.Length, newSnapshot);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Diagnostics\DiagnosticsSquiggleTaggerProviderTests.cs (1)
68workspace.TryApplyChanges(document.WithText(text.WithChanges(new TextChange(new TextSpan(text.Length - 1, 1), string.Empty))).Project.Solution);
EditorAdapter\TextSnapshotImplementationTest.cs (1)
34Assert.Equal(tuple.Item1.Length, text.Length);
Preview\PreviewWorkspaceTests.cs (1)
173var newDocument = oldDocument.WithText(oldText.WithChanges(new TextChange(new TextSpan(0, oldText.Length), "class C { }")));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (7)
Classification\ClassificationTests.vb (4)
97document, New TextSpan(0, text.Length), ClassificationOptions.Default, includeAdditiveSpans:=False, CancellationToken.None) 158document, New TextSpan(0, text.Length), ClassificationOptions.Default, includeAdditiveSpans:=False, CancellationToken.None) 331Await classificationService.AddSyntacticClassificationsAsync(wrongDocument, New TextSpan(0, text.Length), result, CancellationToken.None) 332Await classificationService.AddSemanticClassificationsAsync(wrongDocument, New TextSpan(0, text.Length), options:=Nothing, result, CancellationToken.None)
Diagnostics\DiagnosticServiceTests.vb (2)
351Dim diagnostics1 = diagnosticService.GetDiagnosticsForSpanAsync(p1.Documents.Single(), New TextSpan(0, p1.Documents.Single().GetTextAsync().Result.Length)).Result 356Dim diagnostics2 = diagnosticService.GetDiagnosticsForSpanAsync(p2.Documents.Single(), New TextSpan(0, p2.Documents.Single().GetTextAsync().Result.Length)).Result
FindReferences\FindReferencesTests.vb (1)
450builder.Append(text.GetSubText(New TextSpan(position, text.Length - position)))
Microsoft.CodeAnalysis.Features (18)
AddFileBanner\AbstractAddFileBannerCodeRefactoringProvider.cs (1)
180if (text.Length == 0 || !IsCommentStartCharacter(text[0]))
BraceMatching\AbstractBraceMatcher.cs (1)
68if (position < text.Length && this.IsBrace(text[position]))
BraceMatching\BraceMatchingService.cs (1)
34if (position < 0 || position > text.Length)
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
785var textChange = new TextChange(new TextSpan(result.Length, 0), prefix + newEntry);
Completion\CommonCompletionUtilities.cs (3)
53while (end < text.Length && isWordCharacter(text[end])) 78if (characterPosition < text.Length - 1 && 218if (characterPosition < 0 || characterPosition >= text.Length)
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (1)
60if (targetPosition > 0 && targetPosition <= newText.Length)
ExternalAccess\VSTypeScript\VSTypeScriptTaskListService.cs (1)
45var textSpan = new TextSpan(Math.Min(text.Length, Math.Max(0, d.Position)), 0);
NavigateTo\NavigateToUtilities.cs (4)
38spanStart = spanStart > sourceText.Length ? sourceText.Length : spanStart; 39spanEnd = spanEnd > sourceText.Length ? sourceText.Length : spanEnd;
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (2)
176while (endExclusive < sourceText.Length && 198endExclusive + 1 < sourceText.Length && char.IsLetterOrDigit(sourceText[endExclusive + 1]))
SolutionCrawler\AbstractDocumentDifferenceService.cs (1)
53var incrementalParsingCandidate = range.NewLength != newText.Length;
TextUtilities.cs (1)
35return (next < text.Length) && '\n' == text[next] ? 2 : 1;
Wrapping\AbstractCodeActionComputer.cs (1)
93new TextChange(TextSpan.FromBounds(nodeOrToken.Span.End + newLine.Length, newSourceText.Length), ""));
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Extensions\ProtocolConversions.cs (2)
373Math.Min(text.Length, span.Start), 374Math.Min(text.Length, span.End));
Features\CodeFixes\CodeFixService.cs (1)
302var textSpan = new TextSpan(0, text.Length);
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (1)
361if (location.SourceSpan.End > text.Length)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (1)
114var logPerformanceInfo = range.HasValue && blockForData && range.Value.Length < text.Length;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
SpellCheck\SpellCheckTests.cs (1)
220await InsertTextAsync(testLspServer, document, sourceText.Length, text: " ");
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (1)
139await classificationService.AddSemanticClassificationsAsync(document, new TextSpan(0, text.Length), options, classifiedSpans, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
1679return text.Length;
Microsoft.CodeAnalysis.UnitTests (37)
Text\LargeTextTests.cs (5)
48Assert.Equal(HelloWorld.Length, text.Length); 57Assert.Equal(0, text.Length); 82text.CopyTo(0, buffer, destOffset, text.Length); 127for (int start = 0; start < text.Length; start += HelloWorld.Length) 187if (nextPosition < text.Length)
Text\SourceTextTests.cs (2)
35Assert.Equal(0, text.Length); 325sourceText.Write(writer, TextSpan.FromBounds(1, sourceText.Length));
Text\StringText_LineTest.cs (4)
31var span = TextSpan.FromBounds(0, text.Length); 42var span = TextSpan.FromBounds(0, text.Length); 45Assert.Equal(text.Length, line.End); 83var start = text.Length;
Text\StringTextDecodingTests.cs (1)
325Assert.Equal(0, encodedText.Length);
Text\StringTextTest.cs (1)
140if (nextPosition < text.Length)
Text\TextChangeTests.cs (24)
224Assert.Throws<ArgumentOutOfRangeException>(() => newText.CopyTo(newText.Length - 1, destination, 0, 2)); 360Assert.Equal(str.Length + n, text.Length); 380Assert.Equal(str.Length, text.Length); 389Assert.Equal(26, text.Length); 393Assert.Equal(10, subtext.Length); 405Assert.Equal(6, newText.Length); 416Assert.Equal(20, newText.Length); 428Assert.Equal(25, newText.Length); 444Assert.Equal(27, textWithSegments.Length); 460Assert.Equal(27, textWithSegments.Length); 465Assert.Equal(24, textWithFewerSegments.Length); 479var textWithSegments = text.Replace(new TextSpan(0, text.Length), ""); 480Assert.Equal(0, textWithSegments.Length); 491t = t.Replace(t.Length, 0, b); // add b's 502t = t.Replace(t.Length, 0, "c"); 510Assert.Equal(new string('c', t.Segments[2].Length), t.Segments[2].ToString()); 521t = t.Replace(t.Length, 0, b); // add b's 532t = t.Replace(t.Length, 0, c); // add c's that are the same segment size as the a's and b's 625Assert.Equal(text.Length + largeText.Length, newText.Length); 969var editedLength = originalText.Length; 973var oldMaxInsertLength = originalText.Length * 2; 976for (int i = 0; i < originalText.Length; i += random.Next(maxSkipLength)) 979var newChange = new TextChange(new TextSpan(i, length: random.Next(originalText.Length - i)), newText);
Microsoft.CodeAnalysis.VisualBasic (7)
CommandLine\CommandLineDiagnosticFormatter.vb (1)
39text.Length < diagnosticSpanOpt.Value.End Then
Scanner\Scanner.vb (3)
111_bufferLen = textToScan.Length 727If (position + s_conflictMarkerLength) <= text.Length Then 738Return (position + s_conflictMarkerLength) < text.Length AndAlso
Syntax\VisualBasicSyntaxTree.LazySyntaxTree.vb (1)
68Return _text.Length
Syntax\VisualBasicSyntaxTree.vb (2)
108Return Me.WithChanges(newText, {New TextChangeRange(New TextSpan(0, Me.Length), newText.Length)}) 120If changes.Length = 1 AndAlso changes(0).Span = New TextSpan(0, Me.Length) AndAlso changes(0).NewLength = newText.Length Then
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (4)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.vb (4)
33Await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, document, New TextSpan(0, document.GetTextAsync().Result.Length)) 58Await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(ideEngineWorkspace, ideEngineDocument, New TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length)) 88Return Await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, document, New TextSpan(0, document.GetTextAsync().Result.Length)) 121Await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, sourceDocument, New TextSpan(0, sourceDocument.GetTextAsync().Result.Length))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
CodeGen\CodeGenTuples.vb (1)
6716For i As Integer = 0 To tree.GetText().Length
Microsoft.CodeAnalysis.VisualBasic.Features (1)
DocumentationComments\VisualBasicDocumentationCommentSnippetService.vb (1)
230If position >= syntaxTree.GetText(cancellationToken).Length Then
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (3)
IncrementalParser\IncrementalParser.vb (3)
89For i As Integer = 0 To text.Length - 11 112Dim newText = text.WithChanges(New TextChange(New TextSpan(text.Length, 0), _s.Substring(i, 1))) 1160Dim span = New TextSpan(oldIText.Length, 0)
Microsoft.CodeAnalysis.Workspaces (18)
AbstractVirtualCharService.ITextInfo.cs (1)
24public readonly int Length(SourceText text) => text.Length;
CodeCleanup\CodeCleaner.cs (1)
55return await CleanupAsync(document, new TextSpan(0, text.Length), options, providers, cancellationToken: cancellationToken).ConfigureAwait(false);
J\s\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
24var fullSpan = new TextSpan(0, text.Length); 69if (index < text.Length)
ParsedDocument.cs (1)
84textChanges.Count == 1 && textChanges[0].Span != new TextSpan(0, oldDocument.Text.Length))
Shared\Extensions\FileLinePositionSpanExtensions.cs (1)
90Contract.ThrowIfTrue(end > text.Lines.GetLinePosition(text.Length));
Shared\Extensions\SourceTextExtensions.cs (5)
64var length = text.Length - value.Length; 96startIndex = startIndex + normalized.Length > text.Length 97? text.Length - normalized.Length 131if (position + value.Length > text.Length) 166var length = sourceText.Length;
TemporaryStorage\TemporaryStorageServiceFactory.cs (1)
269var size = Encoding.Unicode.GetMaxByteCount(text.Length);
Workspace\Solution\Document.cs (1)
396if (textChanges.Count > 1 || (textChanges.Count == 1 && textChanges[0].Span != new TextSpan(0, oldText.Length)))
Workspace\Solution\DocumentState.cs (5)
257if (oldText.Length < MaxTextChangeRangeLength && newText.Length < MaxTextChangeRangeLength) 264if (change.NewLength == newText.Length) 693if (newTree.Length == newText.Length) 706FatalError.ReportAndCatch(new Exception($"tree and text has different length {newTree.Length} vs {newText.Length}"), ErrorSeverity.Critical);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
VisualStudioMSBuildWorkspaceTests.cs (1)
3251Assert.Equal("//\u00E2\u20AC\u0153".Length, text.Length);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Formatting\FormattingTestBase.cs (2)
117if (span.Start == 0 && span.End == inputText.Length) 120outputBuilder.Add(TextSpan.FromBounds(0, outputText.Length));
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
SolutionTests\SolutionWithSourceGeneratorTests.cs (1)
547var newText = existingText.WithChanges(new TextChange(new TextSpan(existingText.Length, length: 0), " With Change"));
SymbolKeyTests.cs (1)
1348var newTree = syntaxTree.WithChangedText(text.WithChanges(new TextChange(new TextSpan(0, text.Length), text.ToString().Replace(" ", " "))));
SyntaxPathTests.cs (1)
109var newText = text.WithChanges(new TextChange(new TextSpan(0, text.Length), ""));
Microsoft.VisualStudio.LanguageServices (3)
Workspace\VisualStudioDocumentNavigationService.cs (3)
109var boundedPosition = GetPositionWithinDocumentBounds(position, text.Length); 193var boundedPosition = GetPositionWithinDocumentBounds(position, text.Length); 399var boundedTextSpan = GetSpanWithinDocumentBounds(textSpan, text.Length);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
LanguageService\CSharpHelpContextService.cs (1)
86while (end < text.Length - 1 && syntaxFacts.IsIdentifierPartCharacter(text[end]))
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
CodeModel\MockTextManagerAdapter.TextPoint.cs (1)
32get { return _point.Position == _point.Text.Length; }
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (1)
CodeModel\Mocks\MockTextPoint.vb (1)
46Return _point.Position = _point.Text.Length
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
CodeModel\CSharp\FileCodeModelTests.vb (1)
1227span:=TextSpan.FromBounds(0, textAfterOperation.Length),