1 override of GetLinePosition
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.SnapshotSourceText.cs (1)
167
public override LinePosition
GetLinePosition
(int position)
31 references to GetLinePosition
Microsoft.CodeAnalysis (5)
Syntax\LineDirectiveMap.cs (2)
51
var unmappedStartPos = sourceText.Lines.
GetLinePosition
(span.Start);
52
var unmappedEndPos = sourceText.Lines.
GetLinePosition
(span.End);
Syntax\SyntaxTreeExtensions.cs (1)
71
var position = text.Lines.
GetLinePosition
(index);
Text\TextLineCollection.cs (2)
57
return new LinePositionSpan(
GetLinePosition
(span.Start),
GetLinePosition
(span.End));
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
71
var position = text.Lines.
GetLinePosition
(index);
Microsoft.CodeAnalysis.CSharp (4)
Syntax\CSharpLineDirectiveMap.cs (3)
182
var unmappedPos = sourceText.Lines.
GetLinePosition
(position);
231
var unmappedStartPos = lines.
GetLinePosition
(span.Start);
232
var unmappedEndPos = lines.
GetLinePosition
(span.End);
Syntax\CSharpSyntaxTree.cs (1)
753
=> GetText(cancellationToken).Lines.
GetLinePosition
(position);
Microsoft.CodeAnalysis.CSharp.Features (2)
Structure\Providers\ArgumentListStructureProvider.cs (2)
37
var start = text.Lines.
GetLinePosition
(openToken.SpanStart).Line;
38
var end = text.Lines.
GetLinePosition
(closeToken.SpanStart).Line;
Microsoft.CodeAnalysis.Features (2)
Structure\BlockSpan.cs (2)
134
var startLine = lines.
GetLinePosition
(this.TextSpan.Start).Line;
139
var endLine = lines.
GetLinePosition
(this.TextSpan.End).Line;
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Extensions\ProtocolConversions.cs (1)
282
Position = LinePositionToPosition(text.Lines.
GetLinePosition
(position))
Handler\OnAutoInsert\OnAutoInsertHandler.cs (1)
182
desiredCaretLinePosition = indentedText.Lines.
GetLinePosition
(caretLineInIndentedText.End);
Microsoft.CodeAnalysis.UnitTests (8)
Text\LargeTextTests.cs (4)
175
Assert.Equal(lineNumber, text.Lines.
GetLinePosition
(p).Line);
176
Assert.Equal(p - start, text.Lines.
GetLinePosition
(p).Character);
183
Assert.Equal(lineNumber - 1, text.Lines.
GetLinePosition
(start - 1).Line);
191
Assert.Equal(lineNumber + 1, text.Lines.
GetLinePosition
(nextPosition).Line);
Text\StringTextTest.cs (4)
128
Assert.Equal(lineNumber, text.Lines.
GetLinePosition
(p).Line);
129
Assert.Equal(p - start, text.Lines.
GetLinePosition
(p).Character);
136
Assert.Equal(lineNumber - 1, text.Lines.
GetLinePosition
(start - 1).Line);
144
Assert.Equal(lineNumber + 1, text.Lines.
GetLinePosition
(nextPosition).Line);
Microsoft.CodeAnalysis.VisualBasic (4)
Syntax\VisualBasicLineDirectiveMap.vb (3)
148
Dim unmappedPos As LinePosition = sourceText.Lines.
GetLinePosition
(position)
210
Dim unmappedStartPos = sourceText.Lines.
GetLinePosition
(span.Start)
211
Dim unmappedEndPos = sourceText.Lines.
GetLinePosition
(span.End)
Syntax\VisualBasicSyntaxTree.vb (1)
485
Return Me.GetText().Lines.
GetLinePosition
(position)
Microsoft.CodeAnalysis.Workspaces (3)
Shared\Extensions\FileLinePositionSpanExtensions.cs (2)
89
Contract.ThrowIfTrue(start < text.Lines.
GetLinePosition
(0));
90
Contract.ThrowIfTrue(end > text.Lines.
GetLinePosition
(text.Length));
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
71
var position = text.Lines.
GetLinePosition
(index);