Implemented interface member:
3 overrides of
Microsoft.CodeAnalysis (3)
Text\CompositeText.cs (1)
486public override TextLine this[int lineNumber]
Text\SourceText.cs (1)
1045public override TextLine this[int index]
Text\SubText.cs (1)
131public override TextLine this[int lineNumber]
157 references to
dotnet-format (1)
Formatters\EndOfLineFormatter.cs (1)
39var line = newSourceText.Lines[lineIndex];
GenerateDocumentationAndConfigFiles (7)
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
77var line = text.Lines[position.Line];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (1)
71var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
117var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (3)
111var previousLine = this.Text.Lines[LineToBeIndented.LineNumber - 1]; 153var line = this.Text.Lines[currentLine]; 175var updatedLine = updatedSourceText.Lines[LineToBeIndented.LineNumber];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\AbstractIndentationService.cs (1)
43var lineToBeIndented = document.Text.Lines[lineNumber];
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)
77var line = text.Lines[position.Line];
Text\CompositeText.cs (1)
502var firstSegmentTextLine = firstSegment.Lines[lineNumber - firstSegmentFirstLineNumber];
Text\SubText.cs (1)
148var 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.Analyzers (7)
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
77var line = text.Lines[position.Line];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (1)
71var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
117var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (3)
111var previousLine = this.Text.Lines[LineToBeIndented.LineNumber - 1]; 153var line = this.Text.Lines[currentLine]; 175var updatedLine = updatedSourceText.Lines[LineToBeIndented.LineNumber];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\AbstractIndentationService.cs (1)
43var lineToBeIndented = document.Text.Lines[lineNumber];
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
77var line = text.Lines[position.Line];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (1)
71var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
117var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (3)
111var previousLine = this.Text.Lines[LineToBeIndented.LineNumber - 1]; 153var line = this.Text.Lines[currentLine]; 175var updatedLine = updatedSourceText.Lines[LineToBeIndented.LineNumber];
Microsoft.CodeAnalysis.CodeStyle (6)
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
77var line = text.Lines[position.Line];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (1)
71var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
117var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (3)
111var previousLine = this.Text.Lines[LineToBeIndented.LineNumber - 1]; 153var line = this.Text.Lines[currentLine]; 175var updatedLine = updatedSourceText.Lines[LineToBeIndented.LineNumber];
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\roslyn\src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (2)
214var currentLine = lines[i]; 232var currentLine = lines[i];
src\roslyn\src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (2)
77text.Lines[diagnosticLinePositionSpan.Start.Line].Start, 78text.Lines[diagnosticLinePositionSpan.End.Line].End);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\AbstractIndentationService.cs (1)
43var lineToBeIndented = document.Text.Lines[lineNumber];
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1275var line = referencedLines[lineNumberZeroBased];
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
123if (!IsAllWhitespace(lines[currentLine]))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
204var currentLine = tokenSourceText.Lines[lineNumber];
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (2)
123changes.AddIfNotNull(TryDedentLine(text.Lines[line])); 207changes.AddIfNotNull(TryIndentLine(syntaxTree, root, indentation, text.Lines[line], cancellationToken));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (2)
94var currentLine = sourceText.Lines[currentLineNumber]; 138var currentLine = sourceText.Lines[currentLineNumber];
Microsoft.CodeAnalysis.CSharp.Features (11)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (1)
166return text.Lines[closingBraceLineNumber - 1];
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (1)
302var line = text.Lines[i];
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (1)
76var currentLine = lines[i];
ExtractMethod\CSharpSelectionValidator.cs (1)
420var previousLine = text.Lines[line.LineNumber - 1];
LineSeparators\CSharpLineSeparatorService.cs (1)
337if (string.IsNullOrWhiteSpace(syntaxTree.GetText(cancellationToken).Lines[line + 1].ToString()))
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
123if (!IsAllWhitespace(lines[currentLine]))
src\roslyn\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)
148var line = text.Lines[i];
Structure\Providers\IfDirectiveTriviaStructureProvider.cs (2)
50var startLine = text.Lines[startLineNumber]; 51var endLine = text.Lines[endLineNumber];
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
204var currentLine = tokenSourceText.Lines[lineNumber];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (2)
94var currentLine = sourceText.Lines[currentLineNumber]; 138var currentLine = sourceText.Lines[currentLineNumber];
Microsoft.CodeAnalysis.Features (31)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (5)
110var line = lines[indexOfLine]; 127var line = lines[indexOfLine]; 135token = root.FindToken(lines[indexOfLine].End, findInsideTrivia: true); 271var lineAtPos = lines[indexOfLine]; 278lineAtPos = lines[indexOfLine];
CodeLens\CodeLensReferencesService.cs (1)
325return lines[index].ToString().TrimEnd();
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (2)
68var line = text.Lines[MemberInsertionCompletionItem.GetLine(completionItem)]; 250var textChange = new TextChange(text.Lines[lineNumber].SpanIncludingLineBreak, string.Empty);
DocumentationComments\AbstractDocumentationCommentSnippetService.cs (3)
272var previousLine = text.Lines[line.LineNumber - 1]; 384var previousLine = text.Lines[currentLine.LineNumber - 1]; 392text.Lines[currentLine.LineNumber + 1].ToString().Trim().StartsWith(ExteriorTriviaText, StringComparison.Ordinal);
EditAndContinue\ActiveStatementsMap.cs (2)
274var start = lines[lineSpan.Start.Line].Start + lineSpan.Start.Character; 275var end = lines[lineSpan.End.Line].Start + lineSpan.End.Character;
EditAndContinue\EditSession.cs (6)
218var oldLineSpan = oldText.Lines[i].Span; 219var newLineSpan = newText.Lines[i].Span; 222return newText.Lines[i].Span; 227(newLineCount > oldLineCount) ? newText.Lines[oldLineCount].Span : 228TextSpan.FromBounds(newText.Lines[newLineCount - 1].End, newText.Lines[newLineCount - 1].EndIncludingLineBreak);
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (4)
174var trueSpanStart = text.Lines[ifDirectiveLine.LineNumber + 1].Start; 175var trueSpan = TextSpan.FromBounds(trueSpanStart, Math.Max(trueSpanStart, text.Lines[elseDirectiveLine.LineNumber - 1].SpanIncludingLineBreak.End)); 177var falseSpanStart = text.Lines[elseDirectiveLine.LineNumber + 1].Start; 178var falseSpan = TextSpan.FromBounds(falseSpanStart, Math.Max(falseSpanStart, text.Lines[endIfDirectiveLine.LineNumber - 1].SpanIncludingLineBreak.End));
QuickInfo\IndentationHelper.cs (3)
54var line = lines[lineNumber]; 110var startLineFirstNonWhitespace = lines[startLineNumber].GetFirstNonWhitespacePosition(); 118var line = lines[lineNumber];
src\roslyn\src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (2)
214var currentLine = lines[i]; 232var currentLine = lines[i];
src\roslyn\src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (2)
77text.Lines[diagnosticLinePositionSpan.Start.Line].Start, 78text.Lines[diagnosticLinePositionSpan.End.Line].End);
TaskList\AbstractTaskListService.cs (1)
146var line = text.Lines[lineNumber];
Microsoft.CodeAnalysis.Razor.Compiler (4)
Language\Legacy\SeekableTextReader.cs (4)
80var nextLineSpan = SourceText.Lines[nextLineIndex].Span; 95var prevLineSpan = SourceText.Lines[prevLineIndex].Span; 110var lineSpan = SourceText.Lines[_location.LineIndex].Span; 127_location = new SourceLocation(_filePath, Length, lineNumber, SourceText.Lines[lineNumber].Span.Length);
Microsoft.CodeAnalysis.Razor.DotNetFormat (30)
src\roslyn\src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.Formatting\FormattingUtilities.cs (19)
253var formattedLine = formattedText.Lines[iFormatted]; 256var originalLine = originalText.Lines[iOriginal]; 292formattedLine = formattedText.Lines[iFormatted]; 309formattedText.Lines[initialFormattedLine].EndIncludingLineBreak))); 313replacementBuilder.Append(GetAdjustedFormattedLineText(context, formattedText.Lines[wrappedLineIndex], fixedIndentationWidth, formattedText.Lines[wrappedLineIndex].EndIncludingLineBreak)); 316replacementBuilder.Append(GetAdjustedFormattedLineText(context, formattedText.Lines[iFormatted], fixedIndentationWidth, formattedEnd)); 343originalText.Lines[iOriginal + 1].GetFirstNonWhitespaceOffset() is not null) 346formattedText.Lines[iFormatted + 1].Span.Length == 0) 359originalText.Lines[iOriginal] is { } blankOriginalLine && 361originalText.Lines[iOriginal + 1].GetFirstNonWhitespaceOffset() is not null) 366formattedText.Lines[iFormatted + 1].Span.Length == 0 && 415var originalLine = originalText.Lines[iOriginal]; 491var originalLine = originalText.Lines[previousOriginalLineIndex]; 492var formattedLine = formattedText.Lines[iFormatted]; 519text.Lines[lineNumber] is { Span.Length: > 0 } line && 531var line = text.Lines[lineNumber]; 649formattingChanges.Add(new TextChange(TextSpan.FromBounds(originalText.Lines[iOriginal - 1].End, originalLine.End), "")); 682line = text.Lines[lineIndex];
src\roslyn\src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.Formatting\Passes\CSharpFormattingPass.cs (2)
78if (CSharpDocumentGenerator.TryParseAdditionalLineComment(formattedCSharpText.Lines[iFormatted], out var start, out var length)) 102formattingChanges.Add(new TextChange(new TextSpan(start, length), formattedCSharpText.Lines[iFormatted].ToString()));
src\roslyn\src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.Formatting\Passes\CSharpFormattingPass.CSharpDocumentGenerator.cs (5)
387var expressionStartsBlockLambda = IsBlockLambdaStart(node.SpanStart, _sourceText.Lines[nodeStartLine]); 394_sourceText.Lines[nodeStartLine] is { } previousLine && 428startTagIndentationWidth = _sourceText.Lines[GetLineNumber(attributeStartTag.Name)].GetIndentationSize(_tabSize); 964var lineStart = _sourceText.Lines[GetLineNumber(firstAttributeNameSpan)].GetFirstNonWhitespacePosition().GetValueOrDefault(); 997var templateLine = _sourceText.Lines[GetLineNumber(template.GetFirstToken())];
src\roslyn\src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.Formatting\Passes\RazorFormattingPass.cs (2)
399var openBraceLine = source.Text.Lines[openBraceLineNumber]; 455var closeBraceLine = source.Text.Lines[closeBraceRange.End.Line];
src\roslyn\src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.Workspaces.Shared\Extensions\SourceTextExtensions.cs (1)
240var textLine = text.Lines[line];
src\roslyn\src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.Workspaces.Shared\RazorSyntaxFacts.cs (1)
232var line = sourceText.Lines[linePositionSpan.Start.Line];
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
77var line = text.Lines[position.Line];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (1)
71var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
117var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (3)
111var previousLine = this.Text.Lines[LineToBeIndented.LineNumber - 1]; 153var line = this.Text.Lines[currentLine]; 175var updatedLine = updatedSourceText.Lines[LineToBeIndented.LineNumber];
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)
60startColumn = lines[startLine].SpanIncludingLineBreak.Length; 73endColumn = lines[endLine].SpanIncludingLineBreak.Length; 77startColumn = Math.Min(startColumn, lines[startLine].SpanIncludingLineBreak.Length); 78endColumn = Math.Min(endColumn, lines[endLine].SpanIncludingLineBreak.Length);
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
77var line = text.Lines[position.Line];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (1)
71var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
117var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (3)
111var previousLine = this.Text.Lines[LineToBeIndented.LineNumber - 1]; 153var line = this.Text.Lines[currentLine]; 175var updatedLine = updatedSourceText.Lines[LineToBeIndented.LineNumber];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\AbstractIndentationService.cs (1)
43var lineToBeIndented = document.Text.Lines[lineNumber];
Roslyn.Diagnostics.Analyzers (7)
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
77var line = text.Lines[position.Line];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (1)
71var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
117var linePosition = text.Lines[lineNumber].Start;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (3)
111var previousLine = this.Text.Lines[LineToBeIndented.LineNumber - 1]; 153var line = this.Text.Lines[currentLine]; 175var updatedLine = updatedSourceText.Lines[LineToBeIndented.LineNumber];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\AbstractIndentationService.cs (1)
43var lineToBeIndented = document.Text.Lines[lineNumber];
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
204var currentLine = tokenSourceText.Lines[lineNumber];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (2)
94var currentLine = sourceText.Lines[currentLineNumber]; 138var currentLine = sourceText.Lines[currentLineNumber];