15 instantiations of DocumentSpan
Microsoft.CodeAnalysis.Features (15)
DocumentHighlighting\AbstractDocumentHighlightsService.cs (2)
328? new DocumentSpan(document, token.Span) 329: new DocumentSpan(document, location.SourceSpan);
DocumentIdSpan.cs (1)
31return document == null ? null : new DocumentSpan(document, this.SourceSpan);
ExternalAccess\UnitTesting\API\UnitTestingSearchHelpers.cs (1)
235yield return new UnitTestingDocumentSpan(new DocumentSpan(document, info.Span), mappedSpan);
FindUsages\AbstractFindUsagesService.ProgressAdapter.cs (1)
39var documentSpan = new DocumentSpan(document, span);
FindUsages\DefinitionItemFactory.cs (2)
251source.Add(new DocumentSpan(document, location.SourceSpan, isGeneratedCode)); 323var documentSpan = new DocumentSpan(document, sourceSpan);
FindUsages\IRemoteFindUsagesService.cs (1)
182return new DocumentSpan(document, SourceSpan, IsGeneratedCode);
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (2)
265sourceSpans: [new DocumentSpan(destinationDocument, import.DeclaringSyntaxReference!.Span)], 726sourceSpans: [new DocumentSpan(document, location.SourceSpan)],
Navigation\IDefinitionLocationService.cs (2)
57var navigableItem = await new DocumentSpan(firstItem.Value.document, firstItem.Value.sourceSpan).GetNavigableLocationAsync(cancellationToken).ConfigureAwait(false); 81return new DocumentSpan(document, TextSpan.FromBounds(startPosition, endPosition));
Rename\SymbolicRenameInfo.cs (1)
239documentSpans.Add(new DocumentSpan(sourceDocument, location.SourceSpan));
SemanticSearch\SearchCompilationFailureDefinitionItem.cs (1)
27sourceSpans: queryDocument != null ? [new DocumentSpan(queryDocument, error.Span)] : [],
SemanticSearch\SemanticSearchDefinitionItemFactory.cs (1)
72sourceSpans: [new DocumentSpan(document, span)],
41 references to DocumentSpan
Microsoft.CodeAnalysis.Features (41)
ClassifiedSpansAndHighlightSpanFactory.cs (1)
19DocumentSpan documentSpan, ClassifiedSpansAndHighlightSpan? classifiedSpans, ClassificationOptions options, CancellationToken cancellationToken)
DocumentHighlighting\AbstractDocumentHighlightsService.cs (3)
219var spanSet = new HashSet<DocumentSpan>(); 299private static async Task AddLocationSpanAsync(Location location, Solution solution, HashSet<DocumentSpan> spanSet, MultiDictionary<Document, HighlightSpan> tagList, HighlightSpanKind kind, CancellationToken cancellationToken) 309private static async Task<DocumentSpan?> GetLocationSpanAsync(
DocumentIdSpan.cs (3)
13/// Lightweight analog to <see cref="DocumentSpan"/> that should be used in features that care about 25public static implicit operator DocumentIdSpan(DocumentSpan documentSpan) 28public async Task<DocumentSpan?> TryRehydrateAsync(Solution solution, CancellationToken cancellationToken)
DocumentSpanExtensions.cs (3)
14private static (Workspace workspace, IDocumentNavigationService service) GetNavigationParts(DocumentSpan documentSpan) 22public static Task<INavigableLocation?> GetNavigableLocationAsync(this DocumentSpan documentSpan, CancellationToken cancellationToken) 30this DocumentSpan documentSpan, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\API\UnitTestingDocumentSpan.cs (2)
14internal UnitTestingDocumentSpan(DocumentSpan sourceSpan, FileLinePositionSpan span) 23public DocumentSpan DocumentSpan { get; }
FindUsages\AbstractFindUsagesService.ProgressAdapter.cs (1)
39var documentSpan = new DocumentSpan(document, span);
FindUsages\DefinitionItem.cs (7)
89public ImmutableArray<DocumentSpan> SourceSpans { get; } 119ImmutableArray<DocumentSpan> sourceSpans, 164DocumentSpan sourceSpan, 179DocumentSpan sourceSpan, 196ImmutableArray<DocumentSpan> sourceSpans, 210ImmutableArray<DocumentSpan> sourceSpans, 224ImmutableArray<DocumentSpan> sourceSpans,
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (2)
19/// <see cref="DocumentSpan"/>. 26ImmutableArray<DocumentSpan> sourceSpans,
FindUsages\DefinitionItem.DetachedDefinitionItem.cs (1)
80using var converted = TemporaryArray<DocumentSpan>.Empty;
FindUsages\DefinitionItemFactory.cs (5)
99ImmutableArray<DocumentSpan> sourceLocations, 228private static async Task<ImmutableArray<DocumentSpan>> GetSourceLocationsAsync( 242using var source = TemporaryArray<DocumentSpan>.Empty; 258private static ValueTask<ImmutableArray<ClassifiedSpansAndHighlightSpan?>> ClassifyDocumentSpansAsync(OptionsProvider<ClassificationOptions> optionsProvider, ImmutableArray<DocumentSpan> unclassifiedSpans, CancellationToken cancellationToken) 323var documentSpan = new DocumentSpan(document, sourceSpan);
FindUsages\IRemoteFindUsagesService.cs (2)
174public static SerializableDocumentSpan Dehydrate(DocumentSpan documentSpan) 177public async ValueTask<DocumentSpan> RehydrateAsync(Solution solution, CancellationToken cancellationToken)
FindUsages\SourceReferenceItem.cs (5)
24public DocumentSpan SourceSpan { get; } 51DocumentSpan sourceSpan, 66internal SourceReferenceItem(DefinitionItem definition, DocumentSpan sourceSpan, ClassifiedSpansAndHighlightSpan? classifiedSpans) 72internal SourceReferenceItem(DefinitionItem definition, DocumentSpan sourceSpan, ClassifiedSpansAndHighlightSpan? classifiedSpans, SymbolUsageInfo symbolUsageInfo) 77internal SourceReferenceItem(DefinitionItem definition, DocumentSpan sourceSpan, ClassifiedSpansAndHighlightSpan? classifiedSpans, SymbolUsageInfo symbolUsageInfo, ImmutableArray<(string key, string value)> additionalProperties)
Navigation\IDefinitionLocationService.cs (2)
42internal sealed record DefinitionLocation(INavigableLocation Location, DocumentSpan Span); 64DocumentSpan GetDocumentSpan()
Rename\SymbolicRenameInfo.cs (3)
37public ImmutableArray<DocumentSpan> DocumentSpans { get; } 50ImmutableArray<DocumentSpan> documentSpans) 210using var _ = ArrayBuilder<DocumentSpan>.GetInstance(out var documentSpans);
SemanticSearch\SearchExceptionDefinitionItem.cs (1)
15internal sealed class SearchExceptionDefinitionItem(string message, ImmutableArray<TaggedText> exceptionTypeName, ImmutableArray<TaggedText> stackTrace, DocumentSpan documentSpan)