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