6 instantiations of SemanticRange
Microsoft.CodeAnalysis.Razor.Workspaces (6)
SemanticTokens\AbstractRazorSemanticTokensInfoService.cs (4)
171ranges.Add(new SemanticRange(semanticRange.Kind, originalRange.Start.Line, originalRange.Start.Character, originalRange.End.Line, originalRange.End.Character, tokenModifiers, fromRazor: false)); 194razorRanges.Add(new SemanticRange(textClassification, startLine, previousRange.End.Character, startLine, startChar, _semanticTokensLegendService.TokenModifiers.RazorCodeModifier, fromRazor: false, isCSharpWhitespace: true)); 202razorRanges.Add(new SemanticRange(textClassification, startLine, 0, startLine, startChar, _semanticTokensLegendService.TokenModifiers.RazorCodeModifier, fromRazor: false, isCSharpWhitespace: true)); 284var semanticRange = new SemanticRange(tokenType, startLine, startCharacter, endLine, endCharacter, tokenModifiers, fromRazor: false);
SemanticTokens\SemanticTokensVisitor.cs (2)
625AddRange(new( 652AddRange(new(semanticKind, range, tokenModifer, fromRazor));
22 references to SemanticRange
Microsoft.CodeAnalysis.Razor.Workspaces (22)
SemanticTokens\AbstractRazorSemanticTokensInfoService.cs (16)
35private static readonly ListPool<SemanticRange> s_pool = ListPool<SemanticRange>.Create(maximumObjectSize: 2048, poolSize: 8); 115List<SemanticRange> ranges, 149SemanticRange previousSemanticRange = default; 160var semanticRange = CSharpDataToSemanticRange(lineDelta, charDelta, length, tokenType, tokenModifiers, previousSemanticRange); 183private void AddAdditionalCSharpWhitespaceRanges(List<SemanticRange> razorRanges, int textClassification, SourceText razorSource, LinePositionSpan? previousRazorSemanticRange, LinePositionSpan originalRange) 269private static SemanticRange CSharpDataToSemanticRange( 275SemanticRange previousSemanticRange) 284var semanticRange = new SemanticRange(tokenType, startLine, startCharacter, endLine, endCharacter, tokenModifiers, fromRazor: false); 290List<SemanticRange> semanticRanges, 302SemanticRange previousRange = default; 304foreach (var range in semanticRanges) 306var nextRange = semanticRanges.Count > i + 1 331SemanticRange currentRange, 332SemanticRange previousRange, 333SemanticRange nextRange,
SemanticTokens\SemanticRange.cs (2)
9internal readonly struct SemanticRange : IComparable<SemanticRange> 59public int CompareTo(SemanticRange other)
SemanticTokens\SemanticTokensVisitor.cs (4)
16private readonly List<SemanticRange> _semanticRanges; 24private SemanticTokensVisitor(List<SemanticRange> semanticRanges, RazorCodeDocument razorCodeDocument, TextSpan range, ISemanticTokensLegendService semanticTokensLegend, bool colorCodeBackground) 33public static void AddSemanticRanges(List<SemanticRange> ranges, RazorCodeDocument razorCodeDocument, TextSpan textSpan, ISemanticTokensLegendService razorSemanticTokensLegendService, bool colorCodeBackground) 655private void AddRange(SemanticRange semanticRange)