1 type derived from DocumentSymbol
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\Symbols\RoslynDocumentSymbol.cs (1)
15
internal sealed class RoslynDocumentSymbol :
DocumentSymbol
1 instantiation of DocumentSymbol
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Symbols\DocumentSymbolsTests.cs (1)
252
var documentSymbol = new LSP.
DocumentSymbol
()
32 references to DocumentSymbol
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
Cohost\Handlers\DocumentSymbols.cs (1)
14
public static Task<SumType<
DocumentSymbol
[], SymbolInformation[]>> GetDocumentSymbolsAsync(
Microsoft.CodeAnalysis.LanguageServer.Protocol (15)
Handler\Symbols\DocumentSymbolsHandler.cs (5)
27
internal sealed class DocumentSymbolsHandler : ILspServiceDocumentRequestHandler<RoslynDocumentSymbolParams, SumType<
DocumentSymbol
[], SymbolInformation[]>>
40
public Task<SumType<
DocumentSymbol
[], SymbolInformation[]>> HandleRequestAsync(
51
internal static async Task<SumType<
DocumentSymbol
[], SymbolInformation[]>> GetDocumentSymbolsAsync(
57
return Array.Empty<
DocumentSymbol
>();
62
using var _ = ArrayBuilder<
DocumentSymbol
>.GetInstance(out var symbols);
Handler\Symbols\RoslynDocumentSymbol.cs (2)
11
/// Derived version of <see cref="
DocumentSymbol
" /> used so we can pass additional information we do not want lost for our
13
/// cref="
DocumentSymbol
.Kind"/>.
Protocol\DocumentSymbol.cs (1)
103
public
DocumentSymbol
[]? Children
Protocol\DocumentSymbolParams.cs (2)
19
IPartialResultParams<SumType<SymbolInformation[],
DocumentSymbol
[]>>
41
public IProgress<SumType<SymbolInformation[],
DocumentSymbol
[]>>? PartialResultToken { get; set; }
Protocol\DocumentSymbolSetting.cs (1)
41
/// <see cref="
DocumentSymbol
"/> if <see cref="HierarchicalDocumentSymbolSupport"/> is
Protocol\Internal\Converters\VSInternalExtensionUtilities.cs (1)
54
AddOrReplaceConverter<
DocumentSymbol
, RoslynDocumentSymbol>();
Protocol\Methods.Document.cs (3)
133
/// An array of <see cref="
DocumentSymbol
"/>, which is a hierarchy of symbols found in a given text document.
136
/// Servers should whenever possible return <see cref="
DocumentSymbol
"/> since it is the richer data structure.
148
public static readonly LspRequest<DocumentSymbolParams, SumType<SymbolInformation[],
DocumentSymbol
[]>?> TextDocumentDocumentSymbol = new(TextDocumentDocumentSymbolName);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (16)
Symbols\DocumentSymbolsTests.cs (16)
52
var
classSymbol = CreateDocumentSymbol(LSP.SymbolKind.Class, "A", "Test.A", testLspServer.GetLocations("class").Single(), testLspServer.GetLocations("classSelection").Single());
53
var
constructorSymbol = CreateDocumentSymbol(LSP.SymbolKind.Method, "A", "A()", testLspServer.GetLocations("constructor").Single(), testLspServer.GetLocations("constructorSelection").Single(), classSymbol);
54
var
methodSymbol = CreateDocumentSymbol(LSP.SymbolKind.Method, "M", "M()", testLspServer.GetLocations("method").Single(), testLspServer.GetLocations("methodSelection").Single(), classSymbol);
55
var
operatorSymbol = CreateDocumentSymbol(LSP.SymbolKind.Operator, "operator +", "operator +(A a1, A a2)", testLspServer.GetLocations("operator").Single(), testLspServer.GetLocations("operatorSelection").Single(), classSymbol);
57
LSP.
DocumentSymbol
[] expected = [classSymbol];
59
var results = await RunGetDocumentSymbolsAsync<LSP.
DocumentSymbol
[]>(testLspServer);
206
var
classSymbol = CreateDocumentSymbol(LSP.SymbolKind.Class, "A", "Test.A", testLspServer.GetLocations("class").Single(), testLspServer.GetLocations("classSelection").Single());
207
var
methodSymbol = CreateDocumentSymbol(LSP.SymbolKind.Method, "M", "M()", testLspServer.GetLocations("method").Single(), testLspServer.GetLocations("methodSelection").Single(), classSymbol);
208
var
localFunctionSymbol = CreateDocumentSymbol(LSP.SymbolKind.Method, "LocalFunction", "LocalFunction()", testLspServer.GetLocations("localFunction").Single(), testLspServer.GetLocations("localFunctionSelection").Single(), methodSymbol);
210
LSP.
DocumentSymbol
[] expected = [classSymbol];
212
var results = await RunGetDocumentSymbolsAsync<LSP.
DocumentSymbol
[]>(testLspServer);
233
private static void AssertDocumentSymbolEquals(LSP.
DocumentSymbol
expected, LSP.
DocumentSymbol
actual)
249
private static LSP.
DocumentSymbol
CreateDocumentSymbol(LSP.SymbolKind kind, string name, string detail,
250
LSP.Location location, LSP.Location selection, LSP.
DocumentSymbol
? parent = null)
252
var
documentSymbol = new LSP.DocumentSymbol()