90 instantiations of LinePositionSpan
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (3)
CompilerFailedExceptionFactoryTest.cs (3)
243new LinePositionSpan(new LinePosition(10, 1), new LinePosition(10, 2)))), 249new LinePositionSpan(new LinePosition(1, 2), new LinePosition(3, 4)))), 255new LinePositionSpan(new LinePosition(30, 5), new LinePosition(40, 12)))),
Microsoft.CodeAnalysis (6)
Diagnostic\FileLinePositionSpan.cs (1)
51: this(path, new LinePositionSpan(start, end))
Syntax\LineDirectiveMap.cs (4)
69return new LinePositionSpan(translatePosition(entry, unmappedStartPos), translatePosition(entry, unmappedEndPos)); 91return new LinePositionSpan(translatePosition(entry, unmappedStartPos), translatePosition(entry, unmappedEndPos)); 238var unmapped = new LinePositionSpan( 259var mappedSpan = new LinePositionSpan(
Text\TextLineCollection.cs (1)
57return new LinePositionSpan(GetLinePosition(span.Start), GetLinePosition(span.End));
Microsoft.CodeAnalysis.CSharp (1)
Syntax\CSharpLineDirectiveMap.cs (1)
104return new LineMappingEntry(unmappedLine, new LinePositionSpan(mappedStart, mappedEnd), characterOffset, mappedPathOpt);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
EditAndContinue\ActiveStatementTrackingServiceTests.cs (4)
33var span11 = new LinePositionSpan(new LinePosition(0, 10), new LinePosition(0, 15)); 34var span12 = new LinePositionSpan(new LinePosition(0, 20), new LinePosition(0, 25)); 35var span21 = new LinePositionSpan(new LinePosition(0, 11), new LinePosition(0, 16)); 36var span22 = new LinePositionSpan(new LinePosition(0, 21), new LinePosition(0, 26));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Diagnostics\LocationsTests.cs (3)
504Location location = Location.Create("test.txt", new TextSpan(), new LinePositionSpan(new LinePosition(2, 1), new LinePosition(3, 1))); 515var lineSpan = new LinePositionSpan(new LinePosition(2, 1), new LinePosition(3, 1)); 517var mappedLineSpan = new LinePositionSpan(new LinePosition(3, 2), new LinePosition(4, 2));
Microsoft.CodeAnalysis.EditorFeatures (2)
Navigation\IDocumentNavigationServiceExtensions.cs (1)
88var linePositionSpan = new LinePositionSpan(linePosition, linePosition);
Shared\Extensions\SnapshotSpanExtensions.cs (1)
30return new LinePositionSpan(new LinePosition(startLine, startChar), new LinePosition(endLine, endChar));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
LanguageServer\AbstractLanguageServerProtocolTests.cs (2)
69private static readonly LinePositionSpan s_mappedLinePosition = new LinePositionSpan(new LinePosition(0, 0), new LinePosition(0, 5)); 182var textSpan = lines.GetTextSpan(new LinePositionSpan(startPosition, endPosition));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
952=> Task.FromResult(ImmutableArray.Create(Diagnostic.Create(s_syntaxRule, Location.Create(document.FilePath, TextSpan.FromBounds(0, 0), new LinePositionSpan(new LinePosition(0, 0), new LinePosition(0, 0))))));
Microsoft.CodeAnalysis.Features (3)
EditAndContinue\ActiveStatementsMap.cs (1)
269return new(new(unmappedStartLine, unmappedStartColumn), new(unmappedEndLine, unmappedEndColumn));
EditAndContinue\Utilities\Extensions.cs (2)
19=> new(new LinePosition(span.Start.Line + lineDelta, span.Start.Character), new LinePosition(span.End.Line + lineDelta, span.End.Character)); 31=> new(new(span.StartLine, span.StartColumn), new(span.EndLine, span.EndColumn));
Microsoft.CodeAnalysis.Features.UnitTests (24)
EditAndContinue\ActiveStatementsMapTests.cs (15)
33var span = new LinePositionSpan(new(sl, sc), new(el, ec)); 35new LinePositionSpan(new(3, 0), new(3, 1)), 36new LinePositionSpan(new(3, 5), new(3, 6)), 37new LinePositionSpan(new(4, 4), new(4, 18)), 38new LinePositionSpan(new(5, 1), new(5, 2)), 39new LinePositionSpan(new(5, 2), new(5, 8)), 40new LinePositionSpan(new(19, 0), new(19, 42))); 68var span = new LinePositionSpan(new(sl, sc), new(el, ec)); 70new LinePositionSpan(new(5, 1), new(5, 2)), 71new LinePositionSpan(new(5, 1), new(5, 8)), 72new LinePositionSpan(new(6, 4), new(6, 18))); 81var span = new LinePositionSpan(new(sl, sc), new(el, ec)); 83new LinePositionSpan(new(5, 1), new(5, 2)), 84new LinePositionSpan(new(5, 1), new(5, 3)), 85new LinePositionSpan(new(5, 1), new(5, 8)));
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (7)
431var activeLineSpan = new LinePositionSpan(new(0, 0), new(0, 1)); 4034new ActiveStatementSpan(new ActiveStatementId(0), new LinePositionSpan(new(4, 41), new(4, 42)), ActiveStatementFlags.MethodUpToDate | ActiveStatementFlags.LeafFrame), 4131var expectedSpanG1 = new LinePositionSpan(new LinePosition(3, 41), new LinePosition(3, 42)); 4132var expectedSpanF1 = new LinePositionSpan(new LinePosition(8, 14), new LinePosition(8, 18)); 4144var expectedSpanG2 = new LinePositionSpan(new LinePosition(3, 41), new LinePosition(3, 42)); 4145var expectedSpanF2 = new LinePositionSpan(new LinePosition(9, 14), new LinePosition(9, 18)); 4242var expectedSpanG1 = new LinePositionSpan(new LinePosition(3, 41), new LinePosition(3, 42));
EditAndContinue\RemoteEditAndContinueServiceTests.cs (2)
92var span1 = new LinePositionSpan(new LinePosition(1, 2), new LinePosition(1, 5)); 111new ActiveStatementSpan(new ActiveStatementId(0), new LinePositionSpan(new LinePosition(1, 2), new LinePosition(3, 4)), ActiveStatementFlags.NonLeafFrame, documentId));
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Extensions\ProtocolConversions.cs (1)
296=> new(PositionToLinePosition(range.Start), PositionToLinePosition(range.End));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
Diagnostics\AdditionalFileDiagnosticsTests.cs (1)
137location: Location.Create(context.AdditionalFile.Path, Text.TextSpan.FromBounds(0, 0), new Text.LinePositionSpan(new Text.LinePosition(0, 0), new Text.LinePosition(0, 0))), "args"));
SemanticTokens\SemanticTokensRangeTests.cs (6)
124new LinePositionSpan(new LinePosition(12, 0), new LinePosition(13, 0)), 125new LinePositionSpan(new LinePosition(29, 0), new LinePosition(30, 0)), 181ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(1, 0), new LinePosition(2, 0))]; 231ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(0, 0), new LinePosition(4, 0))]; 290ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(0, 0), new LinePosition(9, 0))]; 371ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(0, 0), new LinePosition(9, 0))];
Microsoft.CodeAnalysis.Test.Utilities (1)
Metadata\ILValidation.cs (1)
421var lineSpan = new LinePositionSpan(new LinePosition(startLine, startColumn), new LinePosition(endLine, endColumn));
Microsoft.CodeAnalysis.UnitTests (25)
Diagnostics\SarifErrorLoggerTests.cs (1)
36var position = new LinePositionSpan(LinePosition.Zero, LinePosition.Zero);
LineMappingTests.cs (24)
19new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)), 20new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: true)), 21new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 2)), hasMappedPath: false)), 22new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(2, 2)), hasMappedPath: false)), 23new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 1), new LinePosition(1, 1)), hasMappedPath: false)), 24new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(1, 0), new LinePosition(1, 1)), hasMappedPath: false)), 25new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("file.cs", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)), 26new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), 0, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)), 27new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 2)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)), 28new LineMapping(new LinePositionSpan(new LinePosition(0, 0), new LinePosition(2, 2)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)), 29new LineMapping(new LinePositionSpan(new LinePosition(0, 1), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)), 30new LineMapping(new LinePositionSpan(new LinePosition(1, 0), new LinePosition(1, 1)), null, new FileLinePositionSpan("", new LinePositionSpan(new LinePosition(0, 0), new LinePosition(1, 1)), hasMappedPath: false)),
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
11138Dim linePosSpan = New LinePositionSpan(New LinePosition(0, 0), New LinePosition(0, span.End))
Microsoft.CodeAnalysis.Workspaces (1)
Shared\Extensions\FileLinePositionSpanExtensions.cs (1)
91return new LinePositionSpan(start, end);
Microsoft.Maui.Controls.SourceGen (1)
CodeBehindGenerator.cs (1)
271 var location = projItem.RelativePath is not null ? Location.Create(projItem.RelativePath, new TextSpan(), new LinePositionSpan()) : null;
Microsoft.VisualStudio.LanguageServices (4)
Diagnostics\VisualStudioVenusSpanMappingService.cs (2)
129return new LinePositionSpan(position1, position2); 132return new LinePositionSpan(position2, position1);
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (1)
266var linePositionSpan = new LinePositionSpan(start: linePosition, end: linePosition);
Workspace\VisualStudioDocumentNavigationService.cs (1)
135return text.Lines.GetTextSpan(new LinePositionSpan(linePosition, linePosition));
146 references to LinePositionSpan
CSharpSyntaxGenerator (1)
SourceGenerator.cs (1)
87var lineSpan = inputText.Lines.GetLinePositionSpan(span);
Microsoft.CodeAnalysis (33)
Diagnostic\DiagnosticFormatter.cs (1)
77internal virtual string FormatSourceSpan(LinePositionSpan span, IFormatProvider? formatter)
Diagnostic\ExternalFileLocation.cs (3)
19internal ExternalFileLocation(string filePath, TextSpan sourceSpan, LinePositionSpan lineSpan) 26internal ExternalFileLocation(string filePath, TextSpan sourceSpan, LinePositionSpan lineSpan, string mappedFilePath, LinePositionSpan mappedLineSpan)
Diagnostic\FileLinePositionSpan.cs (3)
32public LinePositionSpan Span { get; } 61public FileLinePositionSpan(string path, LinePositionSpan span) 68internal FileLinePositionSpan(string path, LinePositionSpan span, bool hasMappedPath)
Diagnostic\Location.cs (3)
171public static Location Create(string filePath, TextSpan textSpan, LinePositionSpan lineSpan) 184public static Location Create(string filePath, TextSpan textSpan, LinePositionSpan lineSpan, string mappedFilePath, LinePositionSpan mappedLineSpan)
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (1)
1642/// which can be created using <see cref="Location.Create(string, TextSpan, LinePositionSpan)"/> API.
Syntax\LineDirectiveMap.cs (5)
61var span = entry.State == PositionState.RemappedSpan ? 67private static LinePositionSpan TranslateLineDirectiveSpan(in LineMappingEntry entry, LinePosition unmappedStartPos, LinePosition unmappedEndPos) 78private static LinePositionSpan TranslateEnhancedLineDirectiveSpan(in LineMappingEntry entry, LinePosition unmappedStartPos, LinePosition unmappedEndPos) 238var unmapped = new LinePositionSpan( 259var mappedSpan = new LinePositionSpan(
Syntax\LineDirectiveMap.LineMappingEntry.cs (2)
67public readonly LinePositionSpan MappedSpan; 106LinePositionSpan mappedSpan,
Syntax\LineMapping.cs (2)
20public readonly LinePositionSpan Span { get; } 34public LineMapping(LinePositionSpan span, int? characterOffset, FileLinePositionSpan mappedSpan)
Text\LinePositionSpan.cs (9)
15public readonly struct LinePositionSpan : IEquatable<LinePositionSpan> 24/// Creates <see cref="LinePositionSpan"/>. 58return obj is LinePositionSpan span && Equals(span); 61public bool Equals(LinePositionSpan other) 72public static bool operator ==(LinePositionSpan left, LinePositionSpan right) 77public static bool operator !=(LinePositionSpan left, LinePositionSpan right) 83/// Provides a string representation for <see cref="LinePositionSpan"/>.
Text\TextLineCollection.cs (4)
53/// Convert a <see cref="TextSpan"/> to a <see cref="LinePositionSpan"/>. 55public LinePositionSpan GetLinePositionSpan(TextSpan span) 74/// Convert a <see cref="LinePositionSpan"/> to <see cref="TextSpan"/>. 76public TextSpan GetTextSpan(LinePositionSpan span)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (1)
69var diagnosticLinePositionSpan = text.Lines.GetLinePositionSpan(diagnosticSpan);
Microsoft.CodeAnalysis.CSharp (1)
CommandLine\CommandLineDiagnosticFormatter.cs (1)
28internal override string FormatSourceSpan(LinePositionSpan span, IFormatProvider formatter)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
EditAndContinue\ActiveStatementTrackingServiceTests.cs (4)
33var span11 = new LinePositionSpan(new LinePosition(0, 10), new LinePosition(0, 15)); 34var span12 = new LinePositionSpan(new LinePosition(0, 20), new LinePosition(0, 25)); 35var span21 = new LinePositionSpan(new LinePosition(0, 11), new LinePosition(0, 16)); 36var span22 = new LinePositionSpan(new LinePosition(0, 21), new LinePosition(0, 26));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
315var oldStatementSpan = oldText.Lines.GetLinePositionSpan(oldStatementTextSpan);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Diagnostics\LineSpanDirectiveTests.cs (1)
491static TextSpan getTextSpan(TextLineCollection lines, LinePositionSpan span)
Diagnostics\LocationsTests.cs (2)
515var lineSpan = new LinePositionSpan(new LinePosition(2, 1), new LinePosition(3, 1)); 517var mappedLineSpan = new LinePositionSpan(new LinePosition(3, 2), new LinePosition(4, 2));
Microsoft.CodeAnalysis.EditorFeatures (2)
Navigation\IDocumentNavigationServiceExtensions.cs (1)
88var linePositionSpan = new LinePositionSpan(linePosition, linePosition);
Shared\Extensions\SnapshotSpanExtensions.cs (1)
27public static LinePositionSpan ToLinePositionSpan(this SnapshotSpan snapshotSpan)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (2)
74var actualLineSpan = tree.GetLineSpan(highlightSpans[j]).Span; 80var expectedLineSpan = tree.GetLineSpan(expectedHighlightSpans[j]).Span;
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
69private static readonly LinePositionSpan s_mappedLinePosition = new LinePositionSpan(new LinePosition(0, 0), new LinePosition(0, 5));
Squiggles\TestDiagnosticTagProducer.cs (1)
32var linePosSpan = sourceText.Lines.GetLinePositionSpan(span);
Microsoft.CodeAnalysis.EditorFeatures.Text (2)
Shared\Extensions\ITextSnapshotExtensions.cs (2)
31/// Convert a <see cref="LinePositionSpan"/> to <see cref="TextSpan"/>. 33public static TextSpan GetTextSpan(this ITextSnapshot snapshot, LinePositionSpan span)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (7)
Peek\DefinitionPeekableItem.cs (2)
92var entityOfInterestSpan = PeekHelpers.GetEntityOfInterestSpan(symbol, workspace, declarationFile.IdentifierLocation, cancellationToken); 101var entityOfInterestSpan = PeekHelpers.GetEntityOfInterestSpan(symbol, workspace, declaration, cancellationToken);
Peek\PeekHelpers.cs (5)
17internal static IDocumentPeekResult CreateDocumentPeekResult(string filePath, LinePositionSpan identifierLocation, LinePositionSpan entityOfInterestSpan, IPeekResultFactory peekResultFactory) 33internal static IDocumentPeekResult CreateDocumentPeekResult(string filePath, LinePositionSpan identifierLocation, LinePositionSpan entityOfInterestSpan, PeekResultDisplayInfo displayInfo, IPeekResultFactory peekResultFactory, bool isReadOnly) 47internal static LinePositionSpan GetEntityOfInterestSpan(ISymbol symbol, Workspace workspace, Location identifierLocation, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.Razor (5)
Cohost\Handlers\SemanticTokensRange.cs (1)
18ImmutableArray<LinePositionSpan> spans,
Cohost\Handlers\ValidateBreakableRange.cs (2)
15public static async Task<LinePositionSpan?> GetBreakableRangeAsync(Document document, LinePositionSpan span, CancellationToken cancellationToken)
RazorMappedSpanResult.cs (2)
14public readonly LinePositionSpan LinePositionSpan; 18public RazorMappedSpanResult(string filePath, LinePositionSpan linePositionSpan, TextSpan span)
Microsoft.CodeAnalysis.Features (30)
EditAndContinue\ActiveStatement.cs (2)
51public ActiveStatement WithSpan(LinePositionSpan span) 60public LinePositionSpan Span
EditAndContinue\ActiveStatementLineSpan.cs (1)
18[property: DataMember(Order = 1)] LinePositionSpan LineSpan);
EditAndContinue\ActiveStatementsMap.cs (11)
75if (!TryGetUpToDateSpan(debugInfo, remapping, out var baseSpan)) 127private static bool TryGetUpToDateSpan(ManagedActiveStatementDebugInfo activeStatementInfo, ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>> remapping, out LinePositionSpan newSpan) 136var activeSpan = activeStatementInfo.SourceSpan.ToLinePositionSpan(); 195void AddStatement(LinePositionSpan unmappedLineSpan, ActiveStatement activeStatement) 212var unmappedSection = lineMapping.Span; 230var unmappedLineSpan = ReverseMapLinePositionSpan(unmappedSection, mappedSection.Span, activeStatement.Span); 255private static LinePositionSpan ReverseMapLinePositionSpan(LinePositionSpan unmappedSection, LinePositionSpan mappedSection, LinePositionSpan mappedSpan) 272private static bool TryGetTextSpan(TextLineCollection lines, LinePositionSpan lineSpan, out TextSpan span)
EditAndContinue\ActiveStatementSpan.cs (1)
24[property: DataMember(Order = 1)] LinePositionSpan LineSpan,
EditAndContinue\DebuggingSession.cs (2)
672using var _3 = PooledDictionary<ActiveStatement, ArrayBuilder<(DocumentId unmappedDocumentId, LinePositionSpan span)>>.GetInstance( 751LinePositionSpan span;
EditAndContinue\SourceFileSpan.cs (3)
23internal readonly struct SourceFileSpan(string path, LinePositionSpan span) : IEquatable<SourceFileSpan> 38public LinePositionSpan Span { get; } = span; 40public SourceFileSpan WithSpan(LinePositionSpan span)
EditAndContinue\Utilities\Extensions.cs (8)
18internal static LinePositionSpan AddLineDelta(this LinePositionSpan span, int lineDelta) 24internal static int GetLineDelta(this LinePositionSpan oldSpan, LinePositionSpan newSpan) 27internal static bool Contains(this LinePositionSpan container, LinePositionSpan span) 30public static LinePositionSpan ToLinePositionSpan(this SourceSpan span) 33public static SourceSpan ToSourceSpan(this LinePositionSpan span)
ExternalAccess\VSTypeScript\Api\VSTypeScriptDiagnosticData.cs (2)
39public LinePositionSpan GetLinePositionSpan(SourceText sourceText, bool useMapped) 46public LinePositionSpan GetLinePositionSpan(SourceText sourceText)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\ActiveStatementTestHelpers.cs (1)
113public static string GetFirstLineText(LinePositionSpan span, SourceText text)
Microsoft.CodeAnalysis.Features.UnitTests (12)
EditAndContinue\ActiveStatementsMapTests.cs (3)
33var span = new LinePositionSpan(new(sl, sc), new(el, ec)); 68var span = new LinePositionSpan(new(sl, sc), new(el, ec)); 81var span = new LinePositionSpan(new(sl, sc), new(el, ec));
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (8)
431var activeLineSpan = new LinePositionSpan(new(0, 0), new(0, 1)); 1034var activeLineSpan1 = CreateText(source1).Lines.GetLinePositionSpan(GetSpan(source1, "System.Console.WriteLine(1);")); 1035var activeLineSpan2 = CreateText(source2).Lines.GetLinePositionSpan(GetSpan(source2, "System.Console.WriteLine(2);")); 4131var expectedSpanG1 = new LinePositionSpan(new LinePosition(3, 41), new LinePosition(3, 42)); 4132var expectedSpanF1 = new LinePositionSpan(new LinePosition(8, 14), new LinePosition(8, 18)); 4144var expectedSpanG2 = new LinePositionSpan(new LinePosition(3, 41), new LinePosition(3, 42)); 4145var expectedSpanF2 = new LinePositionSpan(new LinePosition(9, 14), new LinePosition(9, 18)); 4242var expectedSpanG1 = new LinePositionSpan(new LinePosition(3, 41), new LinePosition(3, 42));
EditAndContinue\RemoteEditAndContinueServiceTests.cs (1)
92var span1 = new LinePositionSpan(new LinePosition(1, 2), new LinePosition(1, 5));
Microsoft.CodeAnalysis.LanguageServer.Protocol (10)
Extensions\ProtocolConversions.cs (4)
295public static LinePositionSpan RangeToLinePositionSpan(LSP.Range range) 300var linePositionSpan = RangeToLinePositionSpan(range); 346public static LSP.Range LinePositionToRange(LinePositionSpan linePositionSpan) 351var linePosSpan = text.Lines.GetLinePositionSpan(textSpan);
Handler\Diagnostics\DiagnosticsPullCache.cs (1)
111static void WriteLinePositionSpan(LinePositionSpan span, ObjectWriter writer)
Handler\FoldingRanges\FoldingRangesHandler.cs (1)
98var linePositionSpan = text.Lines.GetLinePositionSpan(span.TextSpan);
Handler\SemanticTokens\SemanticTokensHelpers.cs (4)
44var spans = new FixedSizeArrayBuilder<LinePositionSpan>(ranges.Length); 58public static async Task<int[]> HandleRequestHelperAsync(Document document, ImmutableArray<LinePositionSpan> spans, bool supportsVisualStudioExtensions, ClassificationOptions options, CancellationToken cancellationToken) 83ImmutableArray<LinePositionSpan> spans, 104foreach (var span in spans)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (1)
226var lineInfo = sourceText.Lines.GetLinePositionSpan(new TextSpan(position, 0));
SemanticTokens\SemanticTokensRangeTests.cs (5)
123ImmutableArray<LinePositionSpan> spans = [ 181ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(1, 0), new LinePosition(2, 0))]; 231ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(0, 0), new LinePosition(4, 0))]; 290ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(0, 0), new LinePosition(9, 0))]; 371ImmutableArray<LinePositionSpan> spans = [new LinePositionSpan(new LinePosition(0, 0), new LinePosition(9, 0))];
SpellCheck\SpellCheckTests.cs (1)
651var lineInfo = sourceText.Lines.GetLinePositionSpan(new TextSpan(position, 0));
Microsoft.CodeAnalysis.Test.Utilities (1)
Metadata\ILValidation.cs (1)
421var lineSpan = new LinePositionSpan(new LinePosition(startLine, startColumn), new LinePosition(endLine, endColumn));
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\SarifErrorLoggerTests.cs (1)
36var position = new LinePositionSpan(LinePosition.Zero, LinePosition.Zero);
Microsoft.CodeAnalysis.VisualBasic (1)
Errors\DiagnosticFormatter.vb (1)
18Friend Overrides Function FormatSourceSpan(span As LinePositionSpan, formatter As IFormatProvider) As String
Microsoft.CodeAnalysis.Workspaces (8)
Shared\Extensions\FileLinePositionSpanExtensions.cs (6)
18public static LinePositionSpan GetClampedSpan(this FileLinePositionSpan span, SourceText text) 28public static TextSpan GetClampedTextSpan(this LinePositionSpan span, SourceText text) 30var clampedSpan = span.GetClampedSpan(text); 35/// Returns a new <see cref="LinePositionSpan"/> based off of the positions in <paramref name="span"/>, but 38public static LinePositionSpan GetClampedSpan(this LinePositionSpan span, SourceText text)
Workspace\Host\DocumentService\ISpanMappingService.cs (2)
65public readonly LinePositionSpan LinePositionSpan; 72public MappedSpanResult(string filePath, LinePositionSpan linePositionSpan, TextSpan span)
Microsoft.Maui.Controls.BindingSourceGen (1)
BindingInvocationDescription.cs (1)
15public sealed record SourceCodeLocation(string FilePath, TextSpan TextSpan, LinePositionSpan LineSpan)
Microsoft.VisualStudio.LanguageServices (10)
Diagnostics\VisualStudioVenusSpanMappingService.cs (5)
44if (!TryAdjustSpanIfNeededForVenus(documentId, originalLineInfo, mappedLineInfo, out var originalSpan, out var mappedSpan)) 101DocumentId documentId, FileLinePositionSpan originalLineInfo, FileLinePositionSpan mappedLineInfo, out LinePositionSpan originalSpan, out LinePositionSpan mappedSpan) 125private static LinePositionSpan GetLinePositionSpan(LinePosition position1, LinePosition position2)
DocumentOutline\DocumentOutlineViewModel_Utilities.cs (3)
152var parentRange = RangeToLinePositionSpan(parent.Range); 153var childRange = RangeToLinePositionSpan(child.Range); 156static LinePositionSpan RangeToLinePositionSpan(Range range)
Progression\GraphBuilder.cs (1)
782public static SourceLocation? TryCreateSourceLocation(string path, LinePositionSpan span)
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (1)
266var linePositionSpan = new LinePositionSpan(start: linePosition, end: linePosition);