140 references to LineNumber
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
402Line {textLine.LineNumber} does not match.
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
402Line {textLine.LineNumber} does not match.
Microsoft.CodeAnalysis (5)
Syntax\LineDirectiveMap.cs (2)
227if (current.UnmappedLine <= lastLine.LineNumber) 230int unmappedEndLine = lastLine.LineNumber;
Text\SubText.cs (2)
116_startLineNumberInUnderlyingText = startLineInUnderlyingText.LineNumber; 117_lineCount = (endLineInUnderlyingText.LineNumber - _startLineNumberInUnderlyingText) + 1;
Text\TextLineCollection.cs (1)
49return new LinePosition(line.LineNumber, position - line.Start);
Microsoft.CodeAnalysis.CodeStyle (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (5)
109if (LineToBeIndented.LineNumber == 0) 112var previousLine = this.Text.Lines[LineToBeIndented.LineNumber - 1]; 152for (var currentLine = this.LineToBeIndented.LineNumber - 1; currentLine >= 0; currentLine--) 174if (LineToBeIndented.LineNumber < updatedSourceText.Lines.Count) 176var updatedLine = updatedSourceText.Lines[LineToBeIndented.LineNumber];
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (2)
211for (var i = startLine.LineNumber + 1; i < lines.Count; i++) 229for (var i = startLine.LineNumber - 1; i >= 0; i--)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (4)
240var lineDistance = tokenLine.LineNumber - locationLine.LineNumber; 538var argumentStartLine = sourceText.Lines.GetLineFromPosition(typedAncestor.Span.Start).LineNumber; 539var caretLine = sourceText.Lines.GetLineFromPosition(position).LineNumber;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
59var indentation = indenter.GetIndentation(newDocument, newTokenLine.LineNumber, options, cancellationToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (2)
112var firstBraceLine = lines.GetLineFromPosition(firstBrace.SpanStart).LineNumber; 113var secondBraceLine = lines.GetLineFromPosition(secondBrace.SpanStart).LineNumber;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (2)
303text.Lines.GetLineFromPosition(expression.SpanStart).LineNumber + 1 == text.Lines.GetLineFromPosition(expression.Span.End).LineNumber &&
Microsoft.CodeAnalysis.CSharp.EditorFeatures (7)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
257if (!locatedAtTheEndOfLine && text.Lines.IndexOf(lastToken.Span.End) != line.LineNumber)
InlineRename\CSharpEditorInlineRenameService.cs (6)
115startLine = documentText.Lines.GetLineFromPosition(surroundingSpanOfInterest.Value.Start).LineNumber; 116endLine = documentText.Lines.GetLineFromPosition(surroundingSpanOfInterest.Value.End).LineNumber; 123var fallbackStartLine = Math.Max(0, documentText.Lines.GetLineFromPosition(fallbackSpan.Start).LineNumber - NumberOfContextLines); 124var fallbackEndLine = Math.Min(documentText.Lines.Count - 1, documentText.Lines.GetLineFromPosition(fallbackSpan.End).LineNumber + NumberOfContextLines); 151startLine = Math.Max(0, documentText.Lines.GetLineFromPosition(fallbackSpan.Start).LineNumber - NumberOfContextLines); 152endLine = Math.Min(documentText.Lines.Count - 1, documentText.Lines.GetLineFromPosition(fallbackSpan.End).LineNumber + NumberOfContextLines);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
StringIndentation\StringIndentationTests.cs (2)
51for (var i = firstLine.LineNumber + 1; i < lastLine.LineNumber; i++)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
PDB\CSharpPDBTestBase.cs (2)
41var startRow = startLine.LineNumber + 1; 45var endRow = endLine.LineNumber + 1;
Microsoft.CodeAnalysis.CSharp.Features (26)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (4)
103var openingPointLine = originalDocumentText.Lines.GetLineFromPosition(openingPoint).LineNumber; 104var closingPointLine = originalDocumentText.Lines.GetLineFromPosition(closingPoint).LineNumber; 148var caretPosition = GetIndentedLinePosition(newDocument, newDocument.Text, desiredCaretLine.LineNumber, options, cancellationToken); 165var closingBraceLineNumber = text.Lines.GetLineFromPosition(closingPosition - 1).LineNumber;
BraceCompletion\ParenthesisBraceCompletionService.cs (2)
52return text.Lines.GetLineFromPosition(openParen.SpanStart).LineNumber == text.Lines.GetLineFromPosition(closeParen.Span.End).LineNumber;
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (1)
363if (interpolationLine.LineNumber > 1 &&
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (2)
80for (var i = firstLine.LineNumber + 1; i < lastLine.LineNumber; i++)
ExtractMethod\CSharpSelectionValidator.cs (2)
545Contract.ThrowIfFalse(line.LineNumber > 0); 546var previousLine = text.Lines[line.LineNumber - 1];
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (2)
112var firstBraceLine = lines.GetLineFromPosition(firstBrace.SpanStart).LineNumber; 113var secondBraceLine = lines.GetLineFromPosition(secondBrace.SpanStart).LineNumber;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (2)
303text.Lines.GetLineFromPosition(expression.SpanStart).LineNumber + 1 == text.Lines.GetLineFromPosition(expression.Span.End).LineNumber &&
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (3)
116var semicolonLine = text.Lines.GetLineFromPosition(fileScopedNamespace.SemicolonToken.SpanStart).LineNumber; 202var openBraceLine = text.Lines.GetLineFromPosition(blockScopedNamespace.OpenBraceToken.SpanStart).LineNumber; 203var closeBraceLine = text.Lines.GetLineFromPosition(blockScopedNamespace.CloseBraceToken.SpanStart).LineNumber;
StringIndentation\CSharpStringIndentationService.cs (4)
142var holeStartLine = text.Lines.GetLineFromPosition(interpolation.SpanStart).LineNumber; 143var holeEndLine = text.Lines.GetLineFromPosition(interpolation.Span.End).LineNumber; 177Contract.ThrowIfTrue(lastLine.LineNumber - firstLine.LineNumber < 2);
Structure\Providers\IfDirectiveTriviaStructureProvider.cs (2)
42var startLineNumber = text.Lines.GetLineFromPosition(directive.SpanStart).LineNumber + 1; 43var endLineNumber = text.Lines.GetLineFromPosition(nextDirective.SpanStart).LineNumber - 1;
Structure\Providers\StringLiteralExpressionStructureProvider.cs (2)
50if (sourceText.Lines.GetLineFromPosition(span.Start).LineNumber != 51sourceText.Lines.GetLineFromPosition(span.End).LineNumber)
Microsoft.CodeAnalysis.Features (18)
DocumentationComments\AbstractDocumentationCommentSnippetService.cs (6)
281if (line.LineNumber == 0) 284var previousLine = text.Lines[line.LineNumber - 1]; 389if (currentLine.LineNumber == 0) 395var previousLine = text.Lines[currentLine.LineNumber - 1]; 402var nextLineStartsWithDocComment = text.Lines.Count > currentLine.LineNumber + 1 && 403text.Lines[currentLine.LineNumber + 1].ToString().Trim().StartsWith(ExteriorTriviaText, StringComparison.Ordinal);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
722lineNumber = line.LineNumber;
QuickInfo\IndentationHelper.cs (4)
49var startLineNumber = lines.GetLineFromPosition(span.Start).LineNumber; 50var endLineNumber = lines.GetLineFromPosition(span.End).LineNumber; 93var startLineNumber = lines.GetLineFromPosition(span.TextSpan.Start).LineNumber; 94var endLineNumber = lines.GetLineFromPosition(span.TextSpan.End).LineNumber;
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (2)
211for (var i = startLine.LineNumber + 1; i < lines.Count; i++) 229for (var i = startLine.LineNumber - 1; i >= 0; i--)
TaskList\AbstractTaskListService.cs (4)
137if (startLine.LineNumber == endLine.LineNumber) 148for (var lineNumber = startLine.LineNumber + 1; lineNumber < endLine.LineNumber; lineNumber++)
Wrapping\AbstractCodeActionComputer.cs (1)
98var originalLineNumber = newSourceText.Lines.GetLineFromPosition(nodeOrToken.Span.End).LineNumber;
Microsoft.CodeAnalysis.UnitTests (7)
Text\LargeTextTests.cs (1)
166Assert.Equal(lineNumber, textLine.LineNumber);
Text\StringText_LineTest.cs (5)
24Assert.Equal(0, line.LineNumber); 35Assert.Equal(0, line.LineNumber); 46Assert.Equal(0, line.LineNumber); 55Assert.Equal(0, line.LineNumber); 91Assert.Equal(1, line.LineNumber);
Text\StringTextTest.cs (1)
119Assert.Equal(lineNumber, textLine.LineNumber);
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\SpecialFormattingOperation.vb (1)
132Dim lineNumber = sourceText.Lines.GetLineFromPosition(argument.SpanStart).LineNumber
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.Indenter.vb (2)
319If firstLine.LineNumber = secondLine.LineNumber Then
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (4)
Utilities\NavigationPointHelpers.vb (4)
15line = text.Lines.GetLineFromPosition(GetHeaderStartPosition(eventBlock)).LineNumber 17line = text.Lines.GetLineFromPosition(eventBlock.EventStatement.Span.End).LineNumber + 1 26line = text.Lines.GetLineFromPosition(GetHeaderStartPosition(methodBlock)).LineNumber 28line = text.Lines.GetLineFromPosition(methodBlock.BlockStatement.Span.End).LineNumber + 1
Microsoft.CodeAnalysis.VisualBasic.Features (3)
Debugging\LocationInfoGetter.vb (1)
43Dim lineNumber = text.Lines.GetLineFromPosition(position).LineNumber
ExtractMethod\VisualBasicSelectionValidator.vb (2)
647Contract.ThrowIfFalse(line.LineNumber > 0) 648Dim previousLine = root.GetText().Lines(line.LineNumber - 1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (5)
Simplification\Reducers\VisualBasicEscapingReducer.vb (2)
155Dim endLineOfQuery = text.Lines.GetLineFromPosition(lastTokenOfQuery.Span.End).LineNumber 156Dim startLineOfCurrentToken = text.Lines.GetLineFromPosition(identifier.SpanStart).LineNumber
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\SpecialFormattingOperation.vb (1)
132Dim lineNumber = sourceText.Lines.GetLineFromPosition(argument.SpanStart).LineNumber
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.Indenter.vb (2)
319If firstLine.LineNumber = secondLine.LineNumber Then
Microsoft.CodeAnalysis.Workspaces (13)
LinkedFileDiffMerging\AbstractLinkedFileMergeConflictCommentAdditionService.cs (2)
44if (changeStartLine.LineNumber >= currentPartitionEndLine.LineNumber + 2)
Shared\Extensions\SourceTextExtensions.cs (1)
39lineNumber = line.LineNumber;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (5)
109if (LineToBeIndented.LineNumber == 0) 112var previousLine = this.Text.Lines[LineToBeIndented.LineNumber - 1]; 152for (var currentLine = this.LineToBeIndented.LineNumber - 1; currentLine >= 0; currentLine--) 174if (LineToBeIndented.LineNumber < updatedSourceText.Lines.Count) 176var updatedLine = updatedSourceText.Lines[LineToBeIndented.LineNumber];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (4)
240var lineDistance = tokenLine.LineNumber - locationLine.LineNumber; 538var argumentStartLine = sourceText.Lines.GetLineFromPosition(typedAncestor.Span.Start).LineNumber; 539var caretLine = sourceText.Lines.GetLineFromPosition(position).LineNumber;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
59var indentation = indenter.GetIndentation(newDocument, newTokenLine.LineNumber, options, cancellationToken);
Microsoft.VisualStudio.LanguageServices (13)
Extensions\DocumentExtensions.cs (2)
46start = text.Lines[line.LineNumber + 1].Start; 51var previousLine = text.Lines[line.LineNumber - 1];
Extensions\VirtualTreePointExtensions.cs (1)
17var lineNumber = line.LineNumber;
FindReferences\Entries\DocumentSpanEntry.cs (1)
235var lineNumber = sourceText.Lines.GetLineFromPosition(referenceSpan.Start).LineNumber;
Implementation\AbstractEditorFactory.cs (1)
366var currentLine = formattedText.Lines[originalLine.LineNumber];
Venus\ContainedDocument.cs (6)
534if (visibleFirstLineInOriginalText.LineNumber == visibleLastLineInOriginalText.LineNumber) 891for (var line = startingLine; line.Start < span.End; line = text.Lines[line.LineNumber + 1]) 895line.LineNumber, 939if (firstLine.LineNumber < lastLine.LineNumber)
Workspace\VisualStudioFormattingRuleFactoryServiceFactory.cs (2)
71if (line.LineNumber > 0) 73line = text.Lines[line.LineNumber - 1];
Microsoft.VisualStudio.LanguageServices.CSharp (5)
CodeModel\CSharpCodeModelService.NodeLocator.cs (5)
143? new VirtualTreePoint(openBrace.SyntaxTree, text, text.Lines[openBraceLine.LineNumber + 1].Start) 173if (openBraceLine.LineNumber + 1 < closeBraceLine.LineNumber && 174openBraceLine.LineNumber < text.Lines.IndexOf(tokenAfterOpenBrace.SpanStart)) 176var lineAfterOpenBrace = text.Lines[openBraceLine.LineNumber + 1];
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
CodeModel\MockTextManagerAdapter.TextPoint.cs (1)
83return _point.GetContainingLine().LineNumber + 1;
Microsoft.VisualStudio.LanguageServices.VisualBasic (8)
CodeModel\VisualBasicCodeModelService.NodeLocator.vb (8)
342If nextStatementLine IsNot Nothing AndAlso nextStatementLine.Value.LineNumber = statementLine.LineNumber Then 346startPosition = text.Lines(statementLine.LineNumber + 1).Start 350Return NavigationPointHelpers.GetNavigationPoint(text, options.TabSize, typeBlock.BlockStatement, statementLine.LineNumber + 1) 413If nextStatementLine IsNot Nothing AndAlso nextStatementLine.Value.LineNumber = statementLine.LineNumber Then 417startPosition = text.Lines(statementLine.LineNumber + 1).Start 421Return NavigationPointHelpers.GetNavigationPoint(text, options.TabSize, enumBlock.EnumStatement, statementLine.LineNumber + 1) 507startPosition = text.Lines(startLine.LineNumber + 1).Start 816startPosition = text.Lines(startLine.LineNumber + 1).Start