74 instantiations of ClassifiedSpan
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (27)
Classification\SyntacticClassifierTests.cs (27)
6055new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(0, 3)), 6056new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentText, new TextSpan(3, 1)), 6057new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(4, 1)), 6058new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentName, new TextSpan(5, 5)), 6059new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentAttributeName, new TextSpan(11, 4)), 6060new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(15, 1)), 6061new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentAttributeQuotes, new TextSpan(16, 1)), 6062new ClassifiedSpan(ClassificationTypeNames.Identifier, new TextSpan(17, 5)), 6063new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentAttributeQuotes, new TextSpan(22, 1)), 6064new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(23, 1)), 6065new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(24, 2)), 6066new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentName, new TextSpan(26, 5)), 6067new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(31, 1)) 6085new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(2, 3)), 6086new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentText, new TextSpan(5, 1)), 6087new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(6, 1)), 6088new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentName, new TextSpan(7, 5)), 6089new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(14, 3)), 6090new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentAttributeName, new TextSpan(18, 4)), 6091new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(22, 1)), 6092new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentAttributeQuotes, new TextSpan(23, 1)), 6093new ClassifiedSpan(ClassificationTypeNames.Identifier, new TextSpan(24, 5)), 6094new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentAttributeQuotes, new TextSpan(29, 1)), 6095new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(30, 1)), 6096new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(31, 2)), 6097new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentName, new TextSpan(33, 5)), 6098new ClassifiedSpan(ClassificationTypeNames.XmlDocCommentDelimiter, new TextSpan(38, 1))
Microsoft.CodeAnalysis.CSharp.Workspaces (21)
Classification\ClassificationHelpers.cs (1)
552return new ClassifiedSpan(
Classification\SyntaxClassification\DiscardSyntaxClassifier.cs (3)
30result.Add(new ClassifiedSpan(syntax.Span, ClassificationTypeNames.Keyword)); 41result.Add(new ClassifiedSpan(parameter.Identifier.Span, ClassificationTypeNames.Keyword)); 51result.Add(new ClassifiedSpan(syntax.Span, ClassificationTypeNames.Keyword));
Classification\SyntaxClassification\NameSyntaxClassifier.cs (14)
146classifiedSpan = new ClassifiedSpan(name.Span, ClassificationTypeNames.NamespaceName); 154classifiedSpan = new ClassifiedSpan(name.Span, ClassificationTypeNames.Keyword); 161classifiedSpan = new ClassifiedSpan(name.Span, ClassificationTypeNames.Keyword); 169classifiedSpan = new ClassifiedSpan(name.Span, ClassificationTypeNames.Keyword); 176classifiedSpan = new ClassifiedSpan(name.Span, ClassificationTypeNames.Keyword); 197classifiedSpan = new ClassifiedSpan(token.Span, GetClassificationForField(fieldSymbol)); 201classifiedSpan = new ClassifiedSpan(token.Span, GetClassificationForMethod(methodSymbol)); 205classifiedSpan = new ClassifiedSpan(token.Span, ClassificationTypeNames.PropertyName); 209classifiedSpan = new ClassifiedSpan(token.Span, ClassificationTypeNames.EventName); 218classifiedSpan = new ClassifiedSpan(token.Span, ClassificationTypeNames.ParameterName); 222classifiedSpan = new ClassifiedSpan(token.Span, GetClassificationForLocal(localSymbol)); 226classifiedSpan = new ClassifiedSpan(token.Span, ClassificationTypeNames.LabelName); 294result.Add(new ClassifiedSpan(token.Span, ClassificationTypeNames.Keyword)); 309result.Add(new ClassifiedSpan(name.Identifier.Span, ClassificationTypeNames.Keyword));
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.cs (1)
50result.Add(new ClassifiedSpan(operatorSpan, ClassificationTypeNames.OperatorOverloaded));
Classification\SyntaxClassification\UsingDirectiveSyntaxClassifier.cs (1)
57result.Add(new ClassifiedSpan(token.Span, ClassificationTypeNames.NamespaceName));
Classification\Worker.cs (1)
56_result.Add(new ClassifiedSpan(type, span));
Microsoft.CodeAnalysis.EditorFeatures (1)
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (1)
551var currentClassifiedSpan = new ClassifiedSpan(lastClassifiedSpan.ClassificationType, currentSnapshotSpan.Span.ToTextSpan());
Microsoft.CodeAnalysis.Features (5)
ClassifiedSpansAndHighlightSpanFactory.cs (3)
83new ClassifiedSpan(ClassificationTypeNames.Text, TextSpan.FromBounds(widenedSpan.Start, narrowSpan.Start)), 84new ClassifiedSpan(ClassificationTypeNames.Text, narrowSpan), 85new ClassifiedSpan(ClassificationTypeNames.Text, TextSpan.FromBounds(narrowSpan.End, widenedSpan.End)),
Common\TaggedText.cs (1)
191yield return new ClassifiedSpan(new TextSpan(index, text.Length), classificationTypeName);
EmbeddedLanguages\Classification\EmbeddedLanguageClassifierContext.cs (1)
68_result.Add(new ClassifiedSpan(classificationType, span));
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\SemanticTokens\SemanticTokensHelpers.cs (1)
215var updatedClassifiedSpan = new ClassifiedSpan(textSpan, classificationType);
Microsoft.CodeAnalysis.VisualBasic.Workspaces (16)
Classification\SyntaxClassification\IdentifierNameSyntaxClassifier.vb (1)
27result.Add(New ClassifiedSpan(ClassificationTypeNames.Keyword, identifier.Span))
Classification\SyntaxClassification\NameSyntaxClassifier.vb (13)
106classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, ClassificationTypeNames.NamespaceName) 112classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, classification) 116classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, ClassificationTypeNames.EventName) 119classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, ClassificationTypeNames.PropertyName) 124classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, classification) 128classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, ClassificationTypeNames.ParameterName) 133classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, classification) 158classifiedSpan = New ClassifiedSpan(GetNameToken(node).Span, ClassificationTypeNames.Keyword) 180classifiedSpan = New ClassifiedSpan(token.Span, ClassificationTypeNames.Keyword) 187classifiedSpan = New ClassifiedSpan(token.Span, ClassificationTypeNames.Keyword) 257result.Add(New ClassifiedSpan(token.Span, ClassificationTypeNames.Keyword)) 284result.Add(New ClassifiedSpan(methodStatement.Identifier.Span, ClassificationTypeNames.ExtensionMethodName)) 292result.Add(New ClassifiedSpan(node.LabelToken.Span, ClassificationTypeNames.LabelName))
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.vb (1)
44result.Add(New ClassifiedSpan(operatorSpan, ClassificationTypeNames.OperatorOverloaded))
Classification\Worker.vb (1)
44_list.Add(New ClassifiedSpan(classificationType, textSpan))
Microsoft.VisualStudio.LanguageServices (2)
Venus\ContainedDocument.DocumentServiceProvider.cs (2)
237builder.Add(new ClassifiedSpan(new TextSpan(0, contentSpan.Length), ClassificationTypeNames.Text)); 244builder.Add(new ClassifiedSpan(new TextSpan(lastSpan.End, contentSpan.Length - lastSpan.End), ClassificationTypeNames.Text));
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
Venus\DocumentService_IntegrationTests.vb (1)
328Return New ExcerptResult(mappedSource.GetSubText(line.Span), New TextSpan(mappedSpan.Start - line.Start, mappedSpan.Length), ImmutableArray.Create(New ClassifiedSpan(New TextSpan(0, line.Span.Length), ClassificationTypeNames.Text)), document, span)
272 references to ClassifiedSpan
IdeBenchmarks (2)
RegexClassifierBenchmarks.cs (2)
69protected Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string code, TextSpan span, ParseOptions parseOptions) 78protected static async Task<ImmutableArray<ClassifiedSpan>> GetSemanticClassificationsAsync(Document document, TextSpan span)
IdeCoreBenchmarks (1)
ClassificationBenchmarks.cs (1)
85protected static async Task<ImmutableArray<ClassifiedSpan>> GetSemanticClassificationsAsync(Document document, TextSpan span)
Microsoft.AspNetCore.App.Analyzers.Test (1)
TestDiagnosticAnalyzer.cs (1)
29public async Task<ClassifiedSpan[]> GetClassificationSpansAsync(TextSpan textSpan, params string[] sources)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Classification\SemanticClassifierTests.cs (1)
34protected override async Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string code, ImmutableArray<TextSpan> spans, ParseOptions? options, TestHost testHost)
Classification\SemanticClassifierTests_TestMarkup.cs (1)
69using var _ = ArrayBuilder<ClassifiedSpan>.GetInstance(out var totalSpans);
Classification\SyntacticClassifierTests.cs (1)
21protected override async Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string code, ImmutableArray<TextSpan> spans, ParseOptions? options, TestHost testHost)
Classification\TotalClassifierTests.cs (1)
32protected override async Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string code, ImmutableArray<TextSpan> spans, ParseOptions? options, TestHost testHost)
Microsoft.CodeAnalysis.CSharp.Features (3)
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (3)
107foreach (var testClassifiedSpan in testFileClassifiedSpans) 111private static IEnumerable<ClassifiedSpan> GetTestFileClassifiedSpans( 238ClassifiedSpan classifiedSpan)
Microsoft.CodeAnalysis.CSharp.Workspaces (30)
Classification\ClassificationHelpers.cs (3)
498internal static void AddLexicalClassifications(SourceText text, TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 506internal static ClassifiedSpan AdjustStaleClassification(SourceText rawText, ClassifiedSpan classifiedSpan)
Classification\CSharpClassificationService.cs (3)
21public override void AddLexicalClassifications(SourceText text, TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 24public override ClassifiedSpan AdjustStaleClassification(SourceText text, ClassifiedSpan classifiedSpan)
Classification\SyntaxClassification\CSharpSyntaxClassificationService.cs (4)
36public override void AddLexicalClassifications(SourceText text, TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 39public override void AddSyntacticClassifications(SyntaxNode root, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 47public override ClassifiedSpan FixClassification(SourceText rawText, ClassifiedSpan classifiedSpan)
Classification\SyntaxClassification\DiscardSyntaxClassifier.cs (1)
25SegmentedList<ClassifiedSpan> result,
Classification\SyntaxClassification\FunctionPointerUnmanagedCallingConventionClassifier.cs (1)
26SegmentedList<ClassifiedSpan> result,
Classification\SyntaxClassification\NameSyntaxClassifier.cs (10)
29SegmentedList<ClassifiedSpan> result, 48SegmentedList<ClassifiedSpan> result, 63SegmentedList<ClassifiedSpan> result) 94SegmentedList<ClassifiedSpan> result) 97using var _ = PooledHashSet<ClassifiedSpan>.GetInstance(out var set); 102if (TryClassifySymbol(name, symbol, out var classifiedSpan)) 128out ClassifiedSpan classifiedSpan) 283SegmentedList<ClassifiedSpan> result) 305SegmentedList<ClassifiedSpan> result) 316private static bool TryClassifySomeContextualKeywordIdentifiersAsKeywords(SimpleNameSyntax name, SymbolInfo symbolInfo, SegmentedList<ClassifiedSpan> result)
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.cs (1)
31SegmentedList<ClassifiedSpan> result,
Classification\SyntaxClassification\SyntaxTokenClassifier.cs (1)
31SegmentedList<ClassifiedSpan> result,
Classification\SyntaxClassification\UsingDirectiveSyntaxClassifier.cs (2)
23SegmentedList<ClassifiedSpan> result, 37SegmentedList<ClassifiedSpan> result,
Classification\Worker.cs (4)
27private readonly SegmentedList<ClassifiedSpan> _result; 30private Worker(TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 38IEnumerable<SyntaxToken> tokens, TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 46SyntaxNode node, TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.EditorFeatures (15)
Classification\CopyPasteAndPrintingClassificationBufferTaggerProvider.Tagger.cs (3)
180bool requireSingleSpan, Func<TextSpan, SegmentedList<ClassifiedSpan>, Task> addTagsAsync) 189Func<TextSpan, SegmentedList<ClassifiedSpan>, Task> addAsync) 199foreach (var classifiedSpan in tempBuffer)
Classification\Semantic\AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs (1)
254foreach (var classifiedSpan in classifiedSpans)
Classification\Semantic\ClassificationUtilities.cs (1)
14public static TagSpan<IClassificationTag> Convert(IClassificationTypeMap typeMap, ITextSnapshot snapshot, ClassifiedSpan classifiedSpan)
Classification\Syntactic\SyntacticClassificationTaggerProvider.ClassifiedLineCache.cs (4)
30private readonly record struct SpanAndClassifiedSpans(Span Span, SegmentedList<ClassifiedSpan> ClassifiedSpans); 47private static readonly ObjectPool<SegmentedList<ClassifiedSpan>> s_classifiedSpanListPool = new(() => new(), CacheSize); 115SegmentedList<ClassifiedSpan> classifications) 133public void Update(SnapshotSpan snapshotSpan, SegmentedList<ClassifiedSpan> newClassifications)
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (6)
427foreach (var classifiedSpan in classifiedSpans) 460private void AddLexicalClassifications(IClassificationService classificationService, SnapshotSpan span, SegmentedList<ClassifiedSpan> classifiedSpans) 474SegmentedList<ClassifiedSpan> classifiedSpans) 514SegmentedList<ClassifiedSpan> classifiedSpans) 544foreach (var lastClassifiedSpan in tempList) 551var currentClassifiedSpan = new ClassifiedSpan(lastClassifiedSpan.ClassificationType, currentSnapshotSpan.Span.ToTextSpan());
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (8)
Classification\AbstractClassifierTests.cs (5)
27protected abstract Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string text, ImmutableArray<TextSpan> spans, ParseOptions? parseOptions, TestHost testHost); 268protected static async Task<ImmutableArray<ClassifiedSpan>> GetSemanticClassificationsAsync(Document document, ImmutableArray<TextSpan> spans) 279protected static async Task<ImmutableArray<ClassifiedSpan>> GetSyntacticClassificationsAsync(Document document, ImmutableArray<TextSpan> spans) 289protected static async Task<ImmutableArray<ClassifiedSpan>> GetAllClassificationsAsync(Document document, ImmutableArray<TextSpan> spans) 297var allClassifications = new List<ClassifiedSpan>(semanticClassifications);
Classification\ClassificationTestHelper.cs (3)
21private static string GetText(ClassifiedSpan tuple) 28IEnumerable<ClassifiedSpan> actualClassifications) 51var actual = actualClassificationList[i];
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
Preview\PreviewStaticClassificationTaggerProvider.cs (2)
69if (!_buffer.Properties.TryGetProperty(PredefinedPreviewTaggerKeys.StaticClassificationSpansKey, out ImmutableArray<ClassifiedSpan> classifiedSpans)) 79foreach (var classifiedSpan in classifiedSpans)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (9)
Classification\ClassificationTests.vb (9)
239Private Shared Function ToTestString(text As SourceText, span As ClassifiedSpan) As String 327Dim result = New SegmentedList(Of ClassifiedSpan)() 342Public Sub AddLexicalClassifications(text As SourceText, textSpan As TextSpan, result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) Implements IClassificationService.AddLexicalClassifications 345Public Sub AddSyntacticClassifications(services As SolutionServices, root As SyntaxNode, textSpans As ImmutableArray(Of TextSpan), result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) Implements IClassificationService.AddSyntacticClassifications 348Public Function AddSemanticClassificationsAsync(document As Document, textSpans As ImmutableArray(Of TextSpan), options As ClassificationOptions, result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) As Task Implements IClassificationService.AddSemanticClassificationsAsync 352Public Function AddSyntacticClassificationsAsync(document As Document, textSpans As ImmutableArray(Of TextSpan), result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) As Task Implements IClassificationService.AddSyntacticClassificationsAsync 356Public Function AdjustStaleClassification(text As SourceText, classifiedSpan As ClassifiedSpan) As ClassifiedSpan Implements IClassificationService.AdjustStaleClassification 367Public Function AddEmbeddedLanguageClassificationsAsync(document As Document, textSpans As ImmutableArray(Of TextSpan), options As ClassificationOptions, result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) As Task Implements IClassificationService.AddEmbeddedLanguageClassificationsAsync
Microsoft.CodeAnalysis.ExternalAccess.FSharp (13)
Classification\IFSharpClassificationService.cs (5)
28void AddLexicalClassifications(SourceText text, TextSpan textSpan, List<ClassifiedSpan> result, CancellationToken cancellationToken); 36Task AddSyntacticClassificationsAsync(Document document, TextSpan textSpan, List<ClassifiedSpan> result, CancellationToken cancellationToken); 44Task AddSemanticClassificationsAsync(Document document, TextSpan textSpan, List<ClassifiedSpan> result, CancellationToken cancellationToken); 55ClassifiedSpan AdjustStaleClassification(SourceText text, ClassifiedSpan classifiedSpan);
Internal\Classification\FSharpClassificationService.cs (8)
26private readonly ObjectPool<List<ClassifiedSpan>> s_listPool = new(() => new()); 35public void AddLexicalClassifications(SourceText text, TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 42public async Task AddSemanticClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 52public async Task AddSyntacticClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 62public ClassifiedSpan AdjustStaleClassification(SourceText text, ClassifiedSpan classifiedSpan) 67public void AddSyntacticClassifications(SolutionServices services, SyntaxNode? root, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 84public Task AddEmbeddedLanguageClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.Razor (3)
RazorClassifierAccessor.cs (1)
16public static async Task<IEnumerable<ClassifiedSpan>> GetClassifiedSpansAsync(Document document, TextSpan textSpan, RazorClassificationOptionsWrapper options, CancellationToken cancellationToken)
RazorExcerptResult.cs (2)
17public readonly ImmutableArray<ClassifiedSpan> ClassifiedSpans; 23public RazorExcerptResult(SourceText content, TextSpan mappedSpan, ImmutableArray<ClassifiedSpan> classifiedSpans, Document document, TextSpan span)
Microsoft.CodeAnalysis.Features (17)
ClassifiedSpansAndHighlightSpan.cs (2)
13ImmutableArray<ClassifiedSpan> classifiedSpans, 18public readonly ImmutableArray<ClassifiedSpan> ClassifiedSpans = classifiedSpans;
ClassifiedSpansAndHighlightSpanFactory.cs (1)
68private static async Task<ImmutableArray<ClassifiedSpan>> GetClassifiedSpansAsync(
Common\TaggedText.cs (1)
182public static IEnumerable<ClassifiedSpan> ToClassifiedSpans(
EmbeddedLanguages\Classification\AbstractEmbeddedLanguageClassificationService.cs (4)
39Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 52SolutionServices services, Project? project, SemanticModel semanticModel, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 72SegmentedList<ClassifiedSpan> result, 81private readonly SegmentedList<ClassifiedSpan> _result = result;
EmbeddedLanguages\Classification\EmbeddedLanguageClassifierContext.cs (2)
17private readonly SegmentedList<ClassifiedSpan> _result; 49SegmentedList<ClassifiedSpan> result,
QuickInfo\IndentationHelper.cs (6)
27public static ImmutableArray<ClassifiedSpan> GetSpansWithAlignedIndentation( 29ImmutableArray<ClassifiedSpan> classifiedSpans, 40using var adjustedClassifiedSpans = TemporaryArray<ClassifiedSpan>.Empty; 44foreach (var classifiedSpan in classifiedSpans) 85ImmutableArray<ClassifiedSpan> spans, 91foreach (var span in spans)
QuickInfo\Presentation\QuickInfoContentBuilder.cs (1)
144foreach (var span in IndentationHelper.GetSpansWithAlignedIndentation(text, classifiedSpans, tabSize))
Microsoft.CodeAnalysis.LanguageServer.Protocol (13)
Handler\References\FindUsagesLSPContext.cs (2)
326ImmutableArray<ClassifiedSpan> classifiedSpans, 330foreach (var span in classifiedSpans)
Handler\SemanticTokens\SemanticTokensHelpers.cs (11)
126SegmentedList<ClassifiedSpan> classifiedSpans, 149private static void ConvertMultiLineToSingleLineSpans(SourceText text, SegmentedList<ClassifiedSpan> classifiedSpans, SegmentedList<ClassifiedSpan> updatedClassifiedSpans) 174SegmentedList<ClassifiedSpan> originalClassifiedSpans, 175SegmentedList<ClassifiedSpan> updatedClassifiedSpans, 215var updatedClassifiedSpan = new ClassifiedSpan(textSpan, classificationType); 237SegmentedList<ClassifiedSpan> classifiedSpans, 276SegmentedList<ClassifiedSpan> classifiedSpans, 382private class ClassifiedSpanComparer : IComparer<ClassifiedSpan> 386public int Compare(ClassifiedSpan x, ClassifiedSpan y) => x.TextSpan.CompareTo(y.TextSpan);
Microsoft.CodeAnalysis.Remote.ServiceHub (9)
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (9)
48private readonly LinkedList<(DocumentId id, ClassificationType type, Checksum checksum, ImmutableArray<ClassifiedSpan> classifiedSpans)> _cachedData = new(); 94foreach (var span in classifiedSpans) 176private static void WriteTo(SegmentedList<ClassifiedSpan> classifiedSpans, ObjectWriter writer) 220private async Task<ImmutableArray<ClassifiedSpan>> TryGetOrReadCachedSemanticClassificationsAsync( 240private bool TryGetFromInMemoryCache(DocumentKey documentKey, Checksum checksum, out ImmutableArray<ClassifiedSpan> classifiedSpans) 260ImmutableArray<ClassifiedSpan> classifiedSpans) 283private async Task<ImmutableArray<ClassifiedSpan>> TryReadCachedSemanticClassificationsAsync( 303private static ImmutableArray<ClassifiedSpan> Read(ObjectReader reader) 320var classifiedSpans = new FixedSizeArrayBuilder<ClassifiedSpan>(classifiedSpanCount);
Microsoft.CodeAnalysis.VisualBasic.Workspaces (27)
Classification\ClassificationHelpers.vb (3)
322Friend Sub AddLexicalClassifications(text As SourceText, textSpan As TextSpan, result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) 329Friend Function AdjustStaleClassification(text As SourceText, classifiedSpan As ClassifiedSpan) As ClassifiedSpan
Classification\SyntaxClassification\IdentifierNameSyntaxClassifier.vb (1)
21Public Overrides Sub AddClassifications(syntax As SyntaxNode, textSpan As TextSpan, semanticModel As SemanticModel, options As ClassificationOptions, result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken)
Classification\SyntaxClassification\ImportAliasClauseSyntaxClassifier.vb (2)
20Public Overrides Sub AddClassifications(syntax As SyntaxNode, textSpan As TextSpan, semanticModel As SemanticModel, options As ClassificationOptions, result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) 27result As SegmentedList(Of ClassifiedSpan),
Classification\SyntaxClassification\NameSyntaxClassifier.vb (9)
35result As SegmentedList(Of ClassifiedSpan), 70result As SegmentedList(Of ClassifiedSpan), 73Dim classifiedSpan As ClassifiedSpan 99ByRef classifiedSpan As ClassifiedSpan) As Boolean 155ByRef classifiedSpan As ClassifiedSpan) As Boolean 169ByRef classifiedSpan As ClassifiedSpan) As Boolean 237result As SegmentedList(Of ClassifiedSpan)) 277Private Shared Sub ClassifyMethodStatement(methodStatement As MethodStatementSyntax, semanticModel As SemanticModel, result As SegmentedList(Of ClassifiedSpan)) 290result As SegmentedList(Of ClassifiedSpan))
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.vb (1)
27result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken)
Classification\SyntaxClassification\VisualBasicSyntaxClassificationService.vb (4)
35Public Overrides Sub AddLexicalClassifications(text As SourceText, textSpan As TextSpan, result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) 39Public Overrides Sub AddSyntacticClassifications(root As SyntaxNode, textSpans As ImmutableArray(Of TextSpan), result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) 45Public Overrides Function FixClassification(text As SourceText, classifiedSpan As ClassifiedSpan) As ClassifiedSpan
Classification\VisualBasicClassificationService.vb (3)
23Public Overrides Sub AddLexicalClassifications(text As SourceText, textSpan As TextSpan, result As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) 27Public Overrides Function AdjustStaleClassification(text As SourceText, classifiedSpan As ClassifiedSpan) As ClassifiedSpan
Classification\Worker.vb (4)
14Private ReadOnly _list As SegmentedList(Of ClassifiedSpan) 20Private Sub New(textSpan As TextSpan, list As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) 29tokens As IEnumerable(Of SyntaxToken), textSpan As TextSpan, list As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) 38node As SyntaxNode, textSpan As TextSpan, list As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken)
Microsoft.CodeAnalysis.Workspaces (110)
Classification\AbstractClassificationService.cs (13)
31public abstract void AddLexicalClassifications(SourceText text, TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken); 32public abstract ClassifiedSpan AdjustStaleClassification(SourceText text, ClassifiedSpan classifiedSpan); 35Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 41Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 51SegmentedList<ClassifiedSpan> result, 113SegmentedList<ClassifiedSpan> result, 142SegmentedList<ClassifiedSpan> result, 202public async Task AddSyntacticClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 209SolutionServices services, SyntaxNode? root, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 221protected static void AddRange(ArrayBuilder<ClassifiedSpan> temp, List<ClassifiedSpan> result) 223foreach (var span in temp)
Classification\ClassificationServiceExtensions.cs (4)
20SegmentedList<ClassifiedSpan> result, 30SegmentedList<ClassifiedSpan> result, 41SegmentedList<ClassifiedSpan> result, 52SegmentedList<ClassifiedSpan> result,
Classification\ClassifiedSpan.cs (3)
11public readonly struct ClassifiedSpan(TextSpan textSpan, string classificationType) : IEquatable<ClassifiedSpan> 25=> obj is ClassifiedSpan span && Equals(span); 27public bool Equals(ClassifiedSpan other)
Classification\ClassifiedSpanIntervalIntrospector.cs (2)
12private readonly struct ClassifiedSpanIntervalIntrospector : IIntervalIntrospector<ClassifiedSpan> 16public TextSpan GetSpan(ClassifiedSpan value)
Classification\Classifier.cs (16)
24internal static PooledObject<SegmentedList<ClassifiedSpan>> GetPooledList(out SegmentedList<ClassifiedSpan> classifiedSpans) 25=> SegmentedListPool.GetPooledList<ClassifiedSpan>(out classifiedSpans); 27public static async Task<IEnumerable<ClassifiedSpan>> GetClassifiedSpansAsync( 39/// Returns classified spans in ascending <see cref="ClassifiedSpan"/> order. 40/// <see cref="ClassifiedSpan"/>s may have the same <see cref="ClassifiedSpan.TextSpan"/>. This occurs when there are multiple 41/// <see cref="ClassifiedSpan.ClassificationType"/>s for the same region of code. For example, a reference to a static method 43/// <see cref="ClassifiedSpan"/>s may also have overlapping <see cref="ClassifiedSpan.TextSpan"/>s. This occurs when there are 47public static IEnumerable<ClassifiedSpan> GetClassifiedSpans( 57internal static IEnumerable<ClassifiedSpan> GetClassifiedSpans( 69internal static IEnumerable<ClassifiedSpan> GetClassifiedSpans( 103var allClassifications = new List<ClassifiedSpan>(semanticClassifications.Where(s => s.TextSpan.OverlapsWith(textSpan))); 124SourceText sourceText, int startPosition, IEnumerable<ClassifiedSpan> classifiedSpans) 128foreach (var span in classifiedSpans)
Classification\ClassifierHelper.cs (23)
29public static async Task<ImmutableArray<ClassifiedSpan>> GetClassifiedSpansAsync( 52public static async Task<ImmutableArray<ClassifiedSpan>> GetClassifiedSpansAsync( 97private static void RemoveAdditiveSpans(SegmentedList<ClassifiedSpan> spans) 101var span = spans[i]; 107private static ImmutableArray<ClassifiedSpan> MergeClassifiedSpans( 108SegmentedList<ClassifiedSpan> syntaxSpans, 109SegmentedList<ClassifiedSpan> semanticSpans, 145private static readonly Comparison<ClassifiedSpan> s_spanComparison = static (s1, s2) => s1.TextSpan.Start - s2.TextSpan.Start; 147private static void Order(SegmentedList<ClassifiedSpan> syntaxSpans) 155private static void AdjustSpans(SegmentedList<ClassifiedSpan> spans, TextSpan widenedSpan) 159var span = spans[i]; 169var previousSpan = spans[i - 1]; 181var newSpan = new ClassifiedSpan(span.ClassificationType, intersection.GetValueOrDefault()); 187int startPosition, SegmentedList<ClassifiedSpan> classifiedSpans, SegmentedList<ClassifiedSpan> result) 189foreach (var span in classifiedSpans) 218SegmentedList<ClassifiedSpan> syntaxParts, 219SegmentedList<ClassifiedSpan> semanticParts, 220SegmentedList<ClassifiedSpan> finalParts) 222MergeParts<ClassifiedSpan, ClassifiedSpanIntervalIntrospector>( 231/// <inheritdoc cref="MergeParts(SegmentedList{ClassifiedSpan}, SegmentedList{ClassifiedSpan}, SegmentedList{ClassifiedSpan})"/>
Classification\EmbeddedLanguageClassificationServiceExtensions.cs (1)
21SegmentedList<ClassifiedSpan> result,
Classification\IClassificationService.cs (7)
28void AddLexicalClassifications(SourceText text, TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken); 34void AddSyntacticClassifications(SolutionServices services, SyntaxNode? root, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken); 46Task AddSyntacticClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken); 63Task AddSemanticClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken); 74Task AddEmbeddedLanguageClassificationsAsync(Document document, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken); 85ClassifiedSpan AdjustStaleClassification(SourceText text, ClassifiedSpan classifiedSpan);
Classification\IEmbeddedLanguageClassificationService.cs (2)
20SegmentedList<ClassifiedSpan> result, 29SegmentedList<ClassifiedSpan> result,
Classification\IRemoteSemanticClassificationService.cs (6)
72internal static SerializableClassifiedSpans Dehydrate(SegmentedList<ClassifiedSpan> classifiedSpans) 78foreach (var classifiedSpan in classifiedSpans) 99internal void Rehydrate(SegmentedList<ClassifiedSpan> classifiedSpans) 106internal ImmutableArray<ClassifiedSpan> Rehydrate() 108var classifiedSpans = new FixedSizeArrayBuilder<ClassifiedSpan>(this.ClassificationTriples.Length / 3); 116private ClassifiedSpan GetClassifiedSpanAt(int index)
Classification\SyntaxClassification\AbstractNameSyntaxClassifier.cs (1)
32SegmentedList<ClassifiedSpan> result)
Classification\SyntaxClassification\AbstractSyntaxClassificationService.cs (6)
19public abstract void AddLexicalClassifications(SourceText text, TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken); 20public abstract void AddSyntacticClassifications(SyntaxNode root, ImmutableArray<TextSpan> textSpans, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken); 23public abstract ClassifiedSpan FixClassification(SourceText text, ClassifiedSpan classifiedSpan); 32SegmentedList<ClassifiedSpan> result, 53SegmentedList<ClassifiedSpan> result,
Classification\SyntaxClassification\AbstractSyntaxClassificationService.Worker.cs (11)
23private readonly SegmentedList<ClassifiedSpan> _list; 27private readonly SegmentedHashSet<ClassifiedSpan> _set; 31private static readonly ObjectPool<SegmentedList<ClassifiedSpan>> s_listPool = new(() => []); 37SegmentedList<ClassifiedSpan> list, 52_set = SharedPools.Default<SegmentedHashSet<ClassifiedSpan>>().AllocateAndClear(); 59SegmentedList<ClassifiedSpan> list, 82SharedPools.Default<SegmentedHashSet<ClassifiedSpan>>().Free(_set); 89var tuple = new ClassifiedSpan(type, textSpan); 138private void AddClassifications(SegmentedList<ClassifiedSpan> classifications) 140foreach (var classification in classifications) 144private void AddClassification(ClassifiedSpan classification)
Classification\SyntaxClassification\AbstractSyntaxClassifier.cs (2)
22public virtual void AddClassifications(SyntaxNode syntax, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 26public virtual void AddClassifications(SyntaxToken syntax, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
Classification\SyntaxClassification\ISyntaxClassificationService.cs (6)
23SegmentedList<ClassifiedSpan> result, 30SegmentedList<ClassifiedSpan> result, 40SegmentedList<ClassifiedSpan> result, 49SegmentedList<ClassifiedSpan> result, 56ClassifiedSpan FixClassification(SourceText text, ClassifiedSpan classifiedSpan);
Classification\SyntaxClassification\ISyntaxClassifier.cs (2)
29void AddClassifications(SyntaxNode node, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken); 34void AddClassifications(SyntaxToken token, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken);
Classification\SyntaxClassification\SyntaxClassificationExtensions.cs (3)
21SegmentedList<ClassifiedSpan> result, 34SegmentedList<ClassifiedSpan> result, 53SegmentedList<ClassifiedSpan> result,
Workspace\Host\DocumentService\IDocumentExcerptService.cs (2)
40internal readonly struct ExcerptResult(SourceText content, TextSpan mappedSpan, ImmutableArray<ClassifiedSpan> classifiedSpans, Document document, TextSpan span) 55public readonly ImmutableArray<ClassifiedSpan> ClassifiedSpans = classifiedSpans;
Microsoft.VisualStudio.LanguageServices (5)
FindReferences\Entries\DocumentSpanEntry.cs (1)
210private static void SetStaticClassifications(ITextBuffer textBuffer, ImmutableArray<ClassifiedSpan> classifiedSpans)
ValueTracking\TreeItemViewModel.cs (2)
39public ImmutableArray<ClassifiedSpan> ClassifiedSpans { get; } 50ImmutableArray<ClassifiedSpan> classifiedSpans,
ValueTracking\ValueTrackedTreeItemViewModel.cs (1)
46ImmutableArray<ClassifiedSpan> classifiedSpans,
Venus\ContainedDocument.DocumentServiceProvider.cs (1)
173private static async Task<ImmutableArray<ClassifiedSpan>> GetClassifiedSpansOnContentAsync(