7 instantiations of DocumentSpan
Microsoft.CodeAnalysis.Features (7)
FindUsages\AbstractFindUsagesService.ProgressAdapter.cs (1)
38var documentSpan = new DocumentSpan(document, span);
FindUsages\DefinitionItemFactory.cs (2)
240source.Add(new DocumentSpan(document, location.SourceSpan)); 308var documentSpan = new DocumentSpan(document, sourceSpan);
FindUsages\IRemoteFindUsagesService.cs (1)
178return new DocumentSpan(document, SourceSpan);
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (1)
747sourceSpans: [new DocumentSpan(document, location.SourceSpan)],
Navigation\IDefinitionLocationService.cs (1)
81return new DocumentSpan(document, TextSpan.FromBounds(startPosition, endPosition));
SemanticSearch\SearchCompilationFailureDefinitionItem.cs (1)
27sourceSpans: queryDocument != null ? [new DocumentSpan(queryDocument, error.Span)] : [],
42 references to DocumentSpan
Microsoft.CodeAnalysis.Features (41)
ClassifiedSpansAndHighlightSpanFactory.cs (1)
19DocumentSpan documentSpan, ClassifiedSpansAndHighlightSpan? classifiedSpans, ClassificationOptions options, CancellationToken cancellationToken)
DocumentHighlighting\AbstractDocumentHighlightsService.cs (3)
209var spanSet = new HashSet<DocumentSpan>(); 289private static async Task AddLocationSpanAsync(Location location, Solution solution, HashSet<DocumentSpan> spanSet, MultiDictionary<Document, HighlightSpan> tagList, HighlightSpanKind kind, CancellationToken cancellationToken) 299private 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)
38var 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)
79using var converted = TemporaryArray<DocumentSpan>.Empty;
FindUsages\DefinitionItemFactory.cs (5)
94ImmutableArray<DocumentSpan> sourceLocations, 223private static ImmutableArray<DocumentSpan> GetSourceLocations(ISymbol definition, ImmutableArray<Location> locations, Solution solution, bool includeHiddenLocations) 232using var source = TemporaryArray<DocumentSpan>.Empty; 247private static ValueTask<ImmutableArray<ClassifiedSpansAndHighlightSpan?>> ClassifyDocumentSpansAsync(OptionsProvider<ClassificationOptions> optionsProvider, ImmutableArray<DocumentSpan> unclassifiedSpans, CancellationToken cancellationToken) 308var documentSpan = new DocumentSpan(document, sourceSpan);
FindUsages\IRemoteFindUsagesService.cs (2)
170public static SerializableDocumentSpan Dehydrate(DocumentSpan documentSpan) 173public 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)
36public ImmutableArray<DocumentSpan> DocumentSpans { get; } 49ImmutableArray<DocumentSpan> documentSpans) 212using 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)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\References\FindUsagesLSPContext.cs (1)
148var documentSpan = reference.SourceSpan;