140 references to End
Microsoft.CodeAnalysis (2)
Diagnostic\FileLinePositionSpan.cs (1)
85
public LinePosition EndLinePosition => Span.
End
;
Text\TextLineCollection.cs (1)
78
return TextSpan.FromBounds(GetPosition(span.Start), GetPosition(span.
End
));
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (1)
78
text.Lines[diagnosticLinePositionSpan.
End
.Line].End);
Microsoft.CodeAnalysis.CSharp (2)
CommandLine\CommandLineDiagnosticFormatter.cs (2)
35
span.
End
.Line + 1,
36
span.
End
.Character + 1);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\LineSpanDirectiveTests.cs (1)
493
return TextSpan.FromBounds(getTextPosition(lines, span.Start), getTextPosition(lines, span.
End
));
Microsoft.CodeAnalysis.EditorFeatures (2)
Peek\PeekHelpers.cs (2)
40
endLine: entityOfInterestSpan.
End
.Line,
41
endIndex: entityOfInterestSpan.
End
.Character,
Microsoft.CodeAnalysis.EditorFeatures.Text (2)
Shared\Extensions\ITextSnapshotExtensions.cs (2)
36
GetPosition(snapshot, span.
End
.Line, span.
End
.Character));
Microsoft.CodeAnalysis.Features (20)
EditAndContinue\ActiveStatementsMap.cs (8)
217
mappedSection.Span.
End
,
253
var unmappedEndLine = mappedSpan.
End
.Line + lineDifference;
259
var unmappedEndColumn = (mappedSpan.
End
.Line == mappedSection.Start.Line)
260
? unmappedSection.Start.Character + mappedSpan.
End
.Character - mappedSection.Start.Character
261
: mappedSpan.
End
.Character;
268
if (lineSpan.Start.Line >= lines.Count || lineSpan.
End
.Line >= lines.Count)
275
var end = lines[lineSpan.
End
.Line].Start + lineSpan.
End
.Character;
EditAndContinue\EditSession.cs (4)
1760
Debug.Assert(newSpan.Span.
End
.Line - newSpan.Span.Start.Line == baseSpan.Span.
End
.Line - baseSpan.Span.Start.Line);
1761
Debug.Assert(region.OldSpan.Span.
End
.Line - region.OldSpan.Span.Start.Line == baseSpan.Span.
End
.Line - baseSpan.Span.Start.Line);
EditAndContinue\SourceFileSpan.cs (1)
62
=> Span.
End
;
EditAndContinue\Utilities\Extensions.cs (6)
21
=> new(new LinePosition(span.Start.Line + lineDelta, span.Start.Character), new LinePosition(span.
End
.Line + lineDelta, span.
End
.Character));
30
=> span.Start >= container.Start && span.
End
<= container.
End
;
36
=> new(span.Start.Line, span.Start.Character, span.
End
.Line, span.
End
.Character);
src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (1)
78
text.Lines[diagnosticLinePositionSpan.
End
.Line].End);
Microsoft.CodeAnalysis.Features.UnitTests (3)
EditAndContinue\ActiveStatementsMapTests.cs (3)
42
Assert.Equal(new Range(s, e), ActiveStatementsMap.GetSpansStartingInSpan(span.Start, span.
End
, array, startPositionComparer: (x, y) => x.Start.CompareTo(y)));
74
Assert.Equal(new Range(s, e), ActiveStatementsMap.GetSpansStartingInSpan(span.Start, span.
End
, array, startPositionComparer: (x, y) => x.Start.CompareTo(y)));
87
Assert.Equal(new Range(s, e), ActiveStatementsMap.GetSpansStartingInSpan(span.Start, span.
End
, array, startPositionComparer: (x, y) => x.Start.CompareTo(y)));
Microsoft.CodeAnalysis.LanguageServer.Protocol (8)
Extensions\ProtocolConversions.cs (4)
334
linePositionSpan.
End
.Line == text.Lines.Count &&
335
linePositionSpan.
End
.Character == 0)
388
=> new() { Start = LinePositionToPosition(linePositionSpan.Start), End = LinePositionToPosition(linePositionSpan.
End
) };
1103
End = LinePositionToPosition(mappedSpanResult.LinePositionSpan.
End
)
Handler\Diagnostics\DiagnosticsPullCache.cs (1)
129
WriteLinePosition(span.
End
, writer);
Handler\FoldingRanges\FoldingRangesHandler.cs (3)
104
if (linePositionSpan.Start.Line == linePositionSpan.
End
.Line)
122
EndLine = linePositionSpan.
End
.Line,
123
EndCharacter = linePositionSpan.
End
.Character,
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Diagnostics\PullDiagnosticTests.cs (2)
832
End = new LSP.Position(originalSpan.
End
.Line, originalSpan.
End
.Character)
Microsoft.CodeAnalysis.Razor.Workspaces (74)
DocumentMapping\AbstractDocumentMappingService.cs (10)
45
if (razorRange.
End
.Line < razorRange.Start.Line ||
46
(razorRange.
End
.Line == razorRange.Start.Line &&
47
razorRange.
End
.Character < razorRange.Start.Character))
67
if (!sourceText.TryGetAbsoluteIndex(range.
End
, out var endIndex) ||
109
else if (originalSpan.Start > razorSpan.
End
)
233
if (!csharpSourceText.TryGetAbsoluteIndex(range.
End
, out var endIndex) ||
264
var endIndex = csharpSourceText.GetRequiredAbsoluteIndex(csharpRange.
End
);
409
var result = IsPositionWithinDocument(span.Start, sourceText) && IsPositionWithinDocument(span.
End
, sourceText);
415
Logger.LogWarning($"Attempted to map a range ({span.Start.Line},{span.Start.Character})-({span.
End
.Line},{span.
End
.Character}) outside of the Source (line count {sourceTextLinesCount}.) This could happen if the Roslyn and Razor LSP servers are not in sync.");
Extensions\LinePositionSpanExtensions.cs (17)
11
=> (start, end) = (linePositionSpan.Start, linePositionSpan.
End
);
14
=> (startLine, startCharacter, endLine, endCharacter) = (linePositionSpan.Start.Line, linePositionSpan.Start.Character, linePositionSpan.
End
.Line, linePositionSpan.
End
.Character);
24
var overlapEnd = span.
End
;
25
if (span.
End
.CompareTo(other.
End
) > 0)
27
overlapEnd = other.
End
;
40
var overlapEnd = span.
End
.Line > other.
End
.Line
41
? other.
End
.Line
42
: span.
End
.Line;
49
return span.Start <= other.Start && span.
End
>= other.
End
;
53
=> new(newStart, span.
End
);
56
=> new(computeNewStart(span.Start), span.
End
);
62
=> new(span.Start, computeNewEnd(span.
End
));
65
=> span.Start.Line != span.
End
.Line;
Extensions\LspFactory.cs (3)
133
=> CreateRange(span.Start, span.
End
);
237
EndLine = linePositionSpan.
End
.Line,
238
EndCharacter = linePositionSpan.
End
.Character
Extensions\RazorCodeDocumentExtensions.cs (2)
81
csharpRange = new LinePositionSpan(startRange.Start, endRange.
End
);
82
Debug.Assert(csharpRange.Start.CompareTo(csharpRange.
End
) <= 0, "Range.Start should not be larger than Range.End");
Extensions\RazorSyntaxNodeExtensions.cs (2)
469
if (endPositionSpan.
End
< startPositionSpan.Start)
475
linePositionSpan = new LinePositionSpan(startPositionSpan.Start, endPositionSpan.
End
);
Extensions\SourceTextExtensions.cs (1)
262
=> text.GetTextSpan(span.Start, span.
End
);
FoldingRanges\FoldingRangeService.cs (2)
45
foldingRange.EndLine = mappedSpan.
End
.Line;
46
foldingRange.EndCharacter = mappedSpan.
End
.Character;
FoldingRanges\UsingsFoldingRangeProvider.cs (3)
30
lastRange.EndLine = span.
End
.Line;
31
lastRange.EndCharacter = span.
End
.Character;
36
if (lastRange.StartLine - 1 == span.
End
.Line)
Formatting\Passes\CSharpOnTypeFormattingPass.cs (8)
170
if (linePositionSpanAfterFormatting.
End
.Line + lineDelta < cleanedText.Lines.Count - 1)
189
var endLineInclusive = Math.Max(lastLine, linePositionSpanAfterFormatting.
End
.Line + lineDelta);
268
lastLine = Math.Max(lastLine, range.
End
.Line);
272
delta += newLineCount - (range.
End
.Line - range.Start.Line);
290
if (mappingLinePositionSpan.Start > spanAfterFormatting.
End
)
464
var mappingEndLineIndex = sourceMappingRange.
End
.Line;
517
var contentStartOffset = text.Lines[mappingEndLineIndex].GetFirstNonWhitespaceOffset(sourceMappingRange.
End
.Character);
549
return linePositionSpan.Start.Line == linePositionSpan.
End
.Line;
Formatting\Passes\RazorFormattingPass.cs (10)
413
openBraceRange.
End
.Line == codeRange.Start.Line &&
418
changes.Add(new TextChange(source.Text.GetTextSpan(openBraceRange.
End
, end), newText));
432
var span = new LinePositionSpan(codeRange.
End
, closeBraceRange.Start);
439
else if (codeRange.
End
.Line == closeBraceRange.Start.Line &&
448
changes.Add(new TextChange(source.Text.GetTextSpan(codeRange.
End
, start), context.NewLineString + additionalIndentation));
454
var closeBraceLine = source.Text.Lines[closeBraceRange.
End
.Line];
455
if (closeBraceLine.GetFirstNonWhitespaceOffset(closeBraceRange.
End
.Character).HasValue)
458
changes.Add(new TextChange(source.Text.GetTextSpan(closeBraceRange.
End
, closeBraceRange.
End
), context.NewLineString));
468
var endIndex = sourceText.GetRequiredAbsoluteIndex(span.
End
);
SemanticTokens\AbstractRazorSemanticTokensInfoService.cs (10)
171
ranges.Add(new SemanticRange(semanticRange.Kind, originalRange.Start.Line, originalRange.Start.Character, originalRange.
End
.Line, originalRange.
End
.Character, tokenModifiers, fromRazor: false));
188
previousRange.
End
.Line == startLine &&
189
previousRange.
End
.Character < startChar &&
190
razorSource.TryGetAbsoluteIndex(previousRange.
End
, out var previousSpanEndIndex) &&
191
ContainsOnlySpacesOrTabs(razorSource, previousSpanEndIndex + 1, startChar - previousRange.
End
.Character - 1))
194
razorRanges.Add(new SemanticRange(textClassification, startLine, previousRange.
End
.Character, startLine, startChar, _semanticTokensLegendService.TokenModifiers.RazorCodeModifier, fromRazor: false, isCSharpWhitespace: true));
197
previousRazorSemanticRange?.
End
.Line != startLine &&
263
result = span1.
End
.CompareTo(span2.
End
);
SemanticTokens\SemanticRange.cs (1)
24
: this(kind, range.Start, range.
End
, modifier, fromRazor)
SemanticTokens\SemanticTokensVisitor.cs (4)
561
if (range.Start.Line != range.
End
.Line)
603
for (var line = lineSpan.Start.Line; line <= lineSpan.
End
.Line; line++)
611
var endChar = line == lineSpan.
End
.Line
612
? lineSpan.
End
.Character
Utilities\WrapWithTagHelper.cs (1)
44
end: range.
End
);
Microsoft.CodeAnalysis.Remote.Razor (4)
DocumentMapping\RemoteDocumentMappingService.cs (3)
69
(generatedDocumentRange.
End
== generatedDocumentRange.Start ||
70
generatedDocumentRange.
End
== classDeclSpan.
End
))
InlineCompletion\RemoteInlineCompletionService.cs (1)
70
var hostDocumentIndex = codeDocument.Source.Text.GetRequiredAbsoluteIndex(razorRange.
End
);
Microsoft.CodeAnalysis.Workspaces (2)
Shared\Extensions\FileLinePositionSpanExtensions.cs (2)
44
var endLine = span.
End
.Line;
48
var endColumn = Math.Max(span.
End
.Character, 0);
Microsoft.VisualStudio.LanguageServices (8)
CallHierarchy\CallHierarchyDetail.cs (1)
33
EndColumn = location.GetLineSpan().Span.
End
.Character;
Diagnostics\VisualStudioVenusSpanMappingService.cs (5)
49
if (originalSpan.Start != originalLineInfo.StartLinePosition || originalSpan.
End
!= originalLineInfo.EndLinePosition)
51
originalLineInfo = new FileLinePositionSpan(originalLineInfo.Path, originalSpan.Start, originalSpan.
End
);
58
var endPos = textLines.GetPosition(originalSpan.
End
);
64
if (mappedSpan.Start != mappedLineInfo.StartLinePosition || mappedSpan.
End
!= mappedLineInfo.EndLinePosition)
66
mappedLineInfo = new FileLinePositionSpan(mappedLineInfo.Path, mappedSpan.Start, mappedSpan.
End
);
Workspace\VisualStudioDocumentNavigationService.cs (2)
308
iEndIndex = mappedSpanResult.LinePositionSpan.
End
.Character,
309
iEndLine = mappedSpanResult.LinePositionSpan.
End
.Line
Microsoft.VisualStudio.LanguageServices.Razor.UnitTests (5)
Cohost\Formatting\FormattingTestBase.cs (1)
98
var lastLine = changes.Max(e => inputText.GetLinePositionSpan(e.Span).
End
.Line);
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\RazorDocumentMappingServiceTest.cs (4)
424
Assert.Equal(0, originalRange.
End
.Line);
425
Assert.Equal(35, originalRange.
End
.Character);
649
Assert.Equal(2, projectedRange.
End
.Line);
650
Assert.Equal(4, projectedRange.
End
.Character);
Microsoft.VisualStudioCode.RazorExtension.UnitTests (4)
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\RazorDocumentMappingServiceTest.cs (4)
424
Assert.Equal(0, originalRange.
End
.Line);
425
Assert.Equal(35, originalRange.
End
.Character);
649
Assert.Equal(2, projectedRange.
End
.Line);
650
Assert.Equal(4, projectedRange.
End
.Character);