Implemented interface member:
4 overrides of Item
Microsoft.CodeAnalysis (3)
Text\CompositeText.cs (1)
486public override TextLine this[int lineNumber]
Text\SourceText.cs (1)
976public override TextLine this[int index]
Text\SubText.cs (1)
140public override TextLine this[int lineNumber]
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.SnapshotSourceText.cs (1)
152public override TextLine this[int index]
107 references to Item
CSharpSyntaxGenerator (1)
SourceGenerator.cs (1)
83var line = inputText.Lines[xmlException.LineNumber - 1]; // LineNumber is one-based.
Microsoft.AspNetCore.App.Analyzers (1)
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (1)
217var currentLine = tokenSourceText.Lines[lineNumber];
Microsoft.CodeAnalysis (7)
Syntax\LineDirectiveMap.cs (1)
208var endLine = lines[unmappedEndLine];
Syntax\SyntaxTreeExtensions.cs (1)
72var line = text.Lines[position.Line];
Text\CompositeText.cs (1)
502var firstSegmentTextLine = firstSegment.Lines[lineNumber - firstSegmentFirstLineNumber];
Text\SubText.cs (1)
157var underlyingTextLine = _subText.UnderlyingText.Lines[lineNumber + _startLineNumberInUnderlyingText];
Text\TextLineCollection.cs (3)
40return this[this.IndexOf(position)]; 70return this[position.Line].Start + position.Character; 115return _lines[ndx];
Microsoft.CodeAnalysis.CodeStyle (6)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
72var line = text.Lines[position.Line];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (1)
72var linePosition = text.Lines[lineNumber].Start;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
111var linePosition = text.Lines[lineNumber].Start;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (3)
112var previousLine = this.Text.Lines[LineToBeIndented.LineNumber - 1]; 154var line = this.Text.Lines[currentLine]; 176var updatedLine = updatedSourceText.Lines[LineToBeIndented.LineNumber];
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (2)
213var currentLine = lines[i]; 231var currentLine = lines[i];
src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (2)
71text.Lines[diagnosticLinePositionSpan.Start.Line].Start, 72text.Lines[diagnosticLinePositionSpan.End.Line].End);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\AbstractIndentationService.cs (1)
46var lineToBeIndented = document.Text.Lines[lineNumber];
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1288var line = referencedLines[lineNumberZeroBased];
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
124if (!IsAllWhitespace(lines[currentLine]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
206var currentLine = tokenSourceText.Lines[lineNumber];
Microsoft.CodeAnalysis.CSharp.EditorFeatures (5)
InlineRename\CSharpEditorInlineRenameService.cs (2)
157startPosition = documentText.Lines[startLine].Start; 158endPosition = documentText.Lines[endLine].End;
StringCopyPaste\KnownSourcePasteProcessor.cs (1)
297builder.Append(sourceText.ToString(sourceText.Lines[i].SpanIncludingLineBreak));
StringCopyPaste\UnknownSourcePasteProcessor.cs (2)
185var currentChangeLine = textOfCurrentChange.Lines[i]; 254var currentChangeLine = textOfCurrentChange.Lines[lineIndex];
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Extensions\SyntaxTreeExtensionsTests.cs (2)
18var line = tree.GetText().Lines[lineNumber]; 27var line = tree.GetText().Lines[lineNumber];
StringIndentation\StringIndentationTests.cs (1)
53var lineStart = text.Lines[i].Start;
Microsoft.CodeAnalysis.CSharp.Features (11)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (1)
166return text.Lines[closingBraceLineNumber - 1];
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (1)
304var line = text.Lines[i];
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (1)
82var currentLine = lines[i];
ExtractMethod\CSharpSelectionValidator.cs (1)
546var previousLine = text.Lines[line.LineNumber - 1];
LineSeparators\CSharpLineSeparatorService.cs (1)
338if (string.IsNullOrWhiteSpace(syntaxTree.GetText(cancellationToken).Lines[line + 1].ToString()))
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
124if (!IsAllWhitespace(lines[currentLine]))
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (2)
123changes.AddIfNotNull(TryDedentLine(text.Lines[line])); 207changes.AddIfNotNull(TryIndentLine(syntaxTree, root, indentation, text.Lines[line], cancellationToken));
StringIndentation\CSharpStringIndentationService.cs (1)
147var line = text.Lines[i];
Structure\Providers\IfDirectiveTriviaStructureProvider.cs (2)
50var startLine = text.Lines[startLineNumber]; 51var endLine = text.Lines[endLineNumber];
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Diagnostics\LineSpanDirectiveTests.cs (1)
500var line = lines[position.Line];
IncrementalParsing\IncrementalParsingTests.cs (2)
624var openBraceLine = initialText.Lines[valueSetterLineIndex - 1]; 836var closeBraceLine = withOpenBraceDeletedLines[valueSetterLineIndex];
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
206var currentLine = tokenSourceText.Lines[lineNumber];
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.cs (1)
37=> line.Snapshot.AsText().Lines[line.LineNumber];
Microsoft.CodeAnalysis.Features (22)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (5)
110var line = lines[indexOfLine]; 127var line = lines[indexOfLine]; 135token = root.FindToken(lines[indexOfLine].End, findInsideTrivia: true); 277var lineAtPos = lines[indexOfLine]; 284lineAtPos = lines[indexOfLine];
DocumentationComments\AbstractDocumentationCommentSnippetService.cs (3)
284var previousLine = text.Lines[line.LineNumber - 1]; 395var previousLine = text.Lines[currentLine.LineNumber - 1]; 403text.Lines[currentLine.LineNumber + 1].ToString().Trim().StartsWith(ExteriorTriviaText, StringComparison.Ordinal);
EditAndContinue\ActiveStatementsMap.cs (2)
280var start = lines[lineSpan.Start.Line].Start + lineSpan.Start.Character; 281var end = lines[lineSpan.End.Line].Start + lineSpan.End.Character;
EditAndContinue\EditSession.cs (6)
219var oldLineSpan = oldText.Lines[i].Span; 220var newLineSpan = newText.Lines[i].Span; 223return newText.Lines[i].Span; 228(newLineCount > oldLineCount) ? newText.Lines[oldLineCount].Span : 229TextSpan.FromBounds(newText.Lines[newLineCount - 1].End, newText.Lines[newLineCount - 1].EndIncludingLineBreak);
QuickInfo\IndentationHelper.cs (3)
54var line = lines[lineNumber]; 110var startLineFirstNonWhitespace = lines[startLineNumber].GetFirstNonWhitespacePosition(); 118var line = lines[lineNumber];
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (2)
213var currentLine = lines[i]; 231var currentLine = lines[i];
TaskList\AbstractTaskListService.cs (1)
150var line = text.Lines[lineNumber];
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\ActiveStatementTestHelpers.cs (1)
114=> text.Lines[span.Start.Line].ToString().Trim();
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\SemanticTokens\SemanticTokensHelpers.cs (1)
189var line = text.Lines[startLine + currentLine];
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
SemanticTokens\AbstractSemanticTokensTests.cs (1)
99var lineLength = text.Lines[currentLine].SpanIncludingLineBreak.Length;
Microsoft.CodeAnalysis.UnitTests (4)
Text\LargeTextTests.cs (2)
157var textLine = text.Lines[lineNumber]; 170CheckEqualLine(textLine, text.Lines[lineNumber]);
Text\StringTextTest.cs (2)
110var textLine = text.Lines[lineNumber]; 123CheckEqualLine(textLine, text.Lines[lineNumber]);
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Syntax\ManualTests.vb (1)
227Dim token = tree.GetRoot().FindToken(text.Lines.Item(3).Start)
Microsoft.CodeAnalysis.Workspaces (15)
LinkedFileDiffMerging\AbstractLinkedFileMergeConflictCommentAdditionService.cs (4)
129if (!text.Lines[startLine].IsEmptyOrWhitespace()) 137if (!text.Lines[endLine].IsEmptyOrWhitespace()) 144? text.GetSubText(TextSpan.FromBounds(text.Lines[startLine].Start, text.Lines[endLine].End)).ToString()
Shared\Extensions\FileLinePositionSpanExtensions.cs (4)
61startColumn = lines[startLine].SpanIncludingLineBreak.Length; 74endColumn = lines[endLine].SpanIncludingLineBreak.Length; 78startColumn = Math.Min(startColumn, lines[startLine].SpanIncludingLineBreak.Length); 79endColumn = Math.Min(endColumn, lines[endLine].SpanIncludingLineBreak.Length);
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
72var line = text.Lines[position.Line];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (1)
72var linePosition = text.Lines[lineNumber].Start;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
111var linePosition = text.Lines[lineNumber].Start;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (3)
112var previousLine = this.Text.Lines[LineToBeIndented.LineNumber - 1]; 154var line = this.Text.Lines[currentLine]; 176var updatedLine = updatedSourceText.Lines[LineToBeIndented.LineNumber];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\AbstractIndentationService.cs (1)
46var lineToBeIndented = document.Text.Lines[lineNumber];
Microsoft.VisualStudio.LanguageServices (13)
CallHierarchy\CallHierarchyDetail.cs (2)
44var start = location.SourceTree.GetText().Lines[lineSpan.StartLinePosition.Line].Start; 45var end = location.SourceTree.GetText().Lines[lineSpan.EndLinePosition.Line].End;
CodeLens\RemoteCodeLensReferencesService.cs (1)
250return lines[index].ToString().TrimEnd();
Extensions\DocumentExtensions.cs (2)
46start = text.Lines[line.LineNumber + 1].Start; 51var previousLine = text.Lines[line.LineNumber - 1];
FindReferences\Entries\DocumentSpanEntry.cs (2)
240sourceText.Lines[firstLineNumber].Start, 241sourceText.Lines[lastLineNumber].End);
Implementation\AbstractEditorFactory.cs (1)
366var currentLine = formattedText.Lines[originalLine.LineNumber];
LanguageService\AbstractLanguageService`2.IVsLanguageTextOps.cs (2)
62var start = text.Lines[ts.iStartLine].Start + ts.iStartIndex; 63var end = text.Lines[ts.iEndLine].Start + ts.iEndIndex;
Progression\GraphQueries\IsUsedByGraphQuery.cs (1)
56var lineText = location.SourceTree.GetText(cancellationToken).Lines[span.StartLinePosition.Line].ToString();
Venus\ContainedDocument.cs (1)
891for (var line = startingLine; line.Start < span.End; line = text.Lines[line.LineNumber + 1])
Workspace\VisualStudioFormattingRuleFactoryServiceFactory.cs (1)
73line = text.Lines[line.LineNumber - 1];
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
143? new VirtualTreePoint(openBrace.SyntaxTree, text, text.Lines[openBraceLine.LineNumber + 1].Start) 176var lineAfterOpenBrace = text.Lines[openBraceLine.LineNumber + 1];