171 references to SymbolKind
Microsoft.CodeAnalysis.LanguageServer.Protocol (57)
Extensions\ProtocolConversions.cs (43)
645
public static LSP.
SymbolKind
NavigateToKindToSymbolKind(string kind)
647
if (Enum.TryParse<LSP.
SymbolKind
>(kind, out
var
symbolKind))
656
return LSP.
SymbolKind
.EnumMember;
658
return LSP.
SymbolKind
.Struct;
660
return LSP.
SymbolKind
.Function;
662
return LSP.
SymbolKind
.Object;
688
public static Glyph SymbolKindToGlyph(LSP.
SymbolKind
kind)
692
case LSP.
SymbolKind
.File:
694
case LSP.
SymbolKind
.Module:
696
case LSP.
SymbolKind
.Namespace:
698
case LSP.
SymbolKind
.Package:
700
case LSP.
SymbolKind
.Class:
702
case LSP.
SymbolKind
.Method:
704
case LSP.
SymbolKind
.Property:
706
case LSP.
SymbolKind
.Field:
708
case LSP.
SymbolKind
.Constructor:
710
case LSP.
SymbolKind
.Enum:
712
case LSP.
SymbolKind
.Interface:
714
case LSP.
SymbolKind
.Function:
716
case LSP.
SymbolKind
.Variable:
718
case LSP.
SymbolKind
.Constant:
719
case LSP.
SymbolKind
.Number:
721
case LSP.
SymbolKind
.String:
722
case LSP.
SymbolKind
.Boolean:
723
case LSP.
SymbolKind
.Array:
724
case LSP.
SymbolKind
.Object:
725
case LSP.
SymbolKind
.Key:
726
case LSP.
SymbolKind
.Null:
728
case LSP.
SymbolKind
.EnumMember:
730
case LSP.
SymbolKind
.Struct:
732
case LSP.
SymbolKind
.Event:
734
case LSP.
SymbolKind
.Operator:
736
case LSP.
SymbolKind
.TypeParameter:
743
public static LSP.
SymbolKind
GlyphToSymbolKind(Glyph glyph)
752
if (Enum.TryParse<LSP.
SymbolKind
>(glyphString, out
var
symbolKind))
763
return LSP.
SymbolKind
.Package;
766
return LSP.
SymbolKind
.File;
775
return LSP.
SymbolKind
.Method;
780
return LSP.
SymbolKind
.Variable;
785
return LSP.
SymbolKind
.Struct;
787
return LSP.
SymbolKind
.Object;
Handler\Symbols\DocumentSymbolsHandler.cs (1)
130
var
kind = ProtocolConversions.GlyphToSymbolKind(item.Glyph);
Handler\Symbols\SymbolInformationFactory.cs (1)
12
public static SymbolInformation Create(string name, string? containerName, LSP.
SymbolKind
kind, LSP.Location location, Glyph glyph, bool supportsVSExtensions)
Protocol\DocumentSymbol.cs (2)
44
/// The <see cref="
SymbolKind
" /> of this symbol.
47
public
SymbolKind
Kind
Protocol\Extensions\VSSymbolInformation.cs (1)
18
/// Gets or sets the icon associated with the symbol. If specified, this icon is used instead of <see cref="
SymbolKind
" />.
Protocol\Navigation\CallHierarchyItem.cs (1)
30
public
SymbolKind
Kind { get; init; }
Protocol\Navigation\TypeHierarchyItem.cs (1)
30
public
SymbolKind
Kind { get; init; }
Protocol\SymbolInformation.cs (2)
40
/// Gets or sets the <see cref="
SymbolKind
"/> of this symbol.
44
public
SymbolKind
Kind
Protocol\SymbolKindSetting.cs (4)
10
/// Represents the <see cref="
SymbolKind
"/> values that the client supports.
22
/// from <see cref="
SymbolKind
.File"/> to <see cref="
SymbolKind
.Array"/> as
28
public
SymbolKind
[]? ValueSet
Protocol\WorkspaceSymbol.cs (1)
30
public
SymbolKind
Kind { get; init; }
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (82)
Symbols\DocumentSymbolsTests.cs (4)
43
CreateSymbolInformation(LSP.
SymbolKind
.Class, "Test.A", testLspServer.GetLocations("class").Single(), Glyph.ClassInternal),
44
CreateSymbolInformation(LSP.
SymbolKind
.Method, "A()", testLspServer.GetLocations("constructor").Single(), Glyph.MethodPublic, "Test.A"),
45
CreateSymbolInformation(LSP.
SymbolKind
.Method, "M()", testLspServer.GetLocations("method").Single(), Glyph.MethodPrivate, "Test.A"),
46
CreateSymbolInformation(LSP.
SymbolKind
.Operator, "operator +(A a1, A a2)", testLspServer.GetLocations("operator").Single(), Glyph.OperatorPrivate, "Test.A"),
Symbols\DocumentSymbolsTests.Hierarchical.cs (68)
40
Symbol(LSP.
SymbolKind
.Namespace, "Test", "Test", "namespace", "namespaceSelection", testLspServer,
41
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
42
Symbol(LSP.
SymbolKind
.Method, "A()", "A()", "constructor", "constructorSelection", testLspServer),
43
Symbol(LSP.
SymbolKind
.Method, "M() : void", "M() : void", "method", "methodSelection", testLspServer),
44
Symbol(LSP.
SymbolKind
.Operator, "operator +(A, A) : A", "operator +(A, A) : A", "operator", "operatorSelection", testLspServer)))
66
Symbol(LSP.
SymbolKind
.Namespace, "NamespaceA", "NamespaceA", "namespace", "namespaceSelection", testLspServer,
67
Symbol(LSP.
SymbolKind
.Class, ".", "", "class", "classSelection", testLspServer))
89
Symbol(LSP.
SymbolKind
.Namespace, ".", "", "namespace", "namespaceSelection", testLspServer)
110
Symbol(LSP.
SymbolKind
.Namespace, "One.Two.Three", "One.Two.Three", "namespace", "namespaceSelection", testLspServer)
140
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
141
Symbol(LSP.
SymbolKind
.Method, "M() : void", "M() : void", "method", "methodSelection", testLspServer,
142
Symbol(LSP.
SymbolKind
.Method, "LocalFunction(string) : int", "LocalFunction(string) : int", "localFunction", "localFunctionSelection", testLspServer,
143
Symbol(LSP.
SymbolKind
.Method, "NestedLocal() : void", "NestedLocal() : void", "nestedLocal", "nestedLocalSelection", testLspServer))))
170
Symbol(LSP.
SymbolKind
.Namespace, "Outer", "Outer", "outerNamespace", "outerNamespaceSelection", testLspServer,
171
Symbol(LSP.
SymbolKind
.Namespace, "Inner", "Inner", "innerNamespace", "innerNamespaceSelection", testLspServer,
172
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer)))
196
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
197
Symbol(LSP.
SymbolKind
.Method, "M() : void", "M() : void", "method", "methodSelection", testLspServer))
228
Symbol(LSP.
SymbolKind
.Class, "A", "A", "classA", "classASelection", testLspServer,
229
Symbol(LSP.
SymbolKind
.Method, "M() : void", "M() : void", "methodA", "methodASelection", testLspServer)),
230
Symbol(LSP.
SymbolKind
.Class, "B", "B", "classB", "classBSelection", testLspServer,
231
Symbol(LSP.
SymbolKind
.Method, "N() : void", "N() : void", "methodB", "methodBSelection", testLspServer))
256
Symbol(LSP.
SymbolKind
.Class, "Outer", "Outer", "class", "classSelection", testLspServer,
257
Symbol(LSP.
SymbolKind
.Enum, "Bar", "Bar", "nestedEnum", "nestedEnumSelection", testLspServer,
258
Symbol(LSP.
SymbolKind
.EnumMember, "None", "None", "enumMember", "enumMemberSelection", testLspServer)))
281
Symbol(LSP.
SymbolKind
.Namespace, "Test", "Test", "namespace", "namespaceSelection", testLspServer,
282
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer))
304
Symbol(LSP.
SymbolKind
.Struct, "MyStruct", "MyStruct", "struct", "structSelection", testLspServer,
305
Symbol(LSP.
SymbolKind
.Field, "Value : int", "Value : int", "field", "fieldSelection", testLspServer))
327
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
328
Symbol(LSP.
SymbolKind
.Field, "a : int", "a : int", "fieldA", "fieldASelection", testLspServer),
329
Symbol(LSP.
SymbolKind
.Field, "b : int", "b : int", "fieldB", "fieldBSelection", testLspServer),
330
Symbol(LSP.
SymbolKind
.Field, "c : int", "c : int", "fieldC", "fieldCSelection", testLspServer))
352
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
353
Symbol(LSP.
SymbolKind
.Event, "A : EventHandler", "A : EventHandler", "eventA", "eventASelection", testLspServer),
354
Symbol(LSP.
SymbolKind
.Event, "B : EventHandler", "B : EventHandler", "eventB", "eventBSelection", testLspServer))
373
Symbol(LSP.
SymbolKind
.Class, "Person", "Person", "record", "recordSelection", testLspServer)
392
Symbol(LSP.
SymbolKind
.Struct, "Point", "Point", "record", "recordSelection", testLspServer)
414
Symbol(LSP.
SymbolKind
.Interface, "IMyInterface", "IMyInterface", "interface", "interfaceSelection", testLspServer,
415
Symbol(LSP.
SymbolKind
.Method, "DoSomething() : void", "DoSomething() : void", "method", "methodSelection", testLspServer))
434
Symbol(LSP.
SymbolKind
.Method, "MyDelegate(int) : void", "MyDelegate(int) : void", "delegate", "delegateSelection", testLspServer)
458
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
459
Symbol(LSP.
SymbolKind
.Method, "~A()", "~A()", "destructor", "destructorSelection", testLspServer))
481
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
482
Symbol(LSP.
SymbolKind
.Property, "Value : int", "Value : int", "property", "propertySelection", testLspServer))
504
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
505
Symbol(LSP.
SymbolKind
.Property, "this[int] : int", "this[int] : int", "indexer", "indexerSelection", testLspServer))
531
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
532
Symbol(LSP.
SymbolKind
.Event, "MyEvent : EventHandler", "MyEvent : EventHandler", "event", "eventSelection", testLspServer))
554
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
555
Symbol(LSP.
SymbolKind
.Event, "MyEvent : EventHandler", "MyEvent : EventHandler", "eventField", "eventFieldSelection", testLspServer))
577
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
578
Symbol(LSP.
SymbolKind
.Operator, "implicit operator int(A)", "implicit operator int(A)", "operator", "operatorSelection", testLspServer))
600
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
601
Symbol(LSP.
SymbolKind
.Operator, "explicit operator int(A)", "explicit operator int(A)", "operator", "operatorSelection", testLspServer))
623
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
624
Symbol(LSP.
SymbolKind
.Constant, "MaxValue : int", "MaxValue : int", "const", "constSelection", testLspServer))
645
Symbol(LSP.
SymbolKind
.Class, "MyClass<T>", "MyClass<T>", "class", "classSelection", testLspServer)
666
Symbol(LSP.
SymbolKind
.Class, "Dictionary<TKey, TValue>", "Dictionary<TKey, TValue>", "class", "classSelection", testLspServer)
688
Symbol(LSP.
SymbolKind
.Class, "A", "A", "class", "classSelection", testLspServer,
689
Symbol(LSP.
SymbolKind
.Method, "GetValue<T>(T) : T", "GetValue<T>(T) : T", "method", "methodSelection", testLspServer))
711
Symbol(LSP.
SymbolKind
.Interface, "IRepository<T>", "IRepository<T>", "interface", "interfaceSelection", testLspServer,
712
Symbol(LSP.
SymbolKind
.Method, "GetById(int) : T", "GetById(int) : T", "method", "methodSelection", testLspServer))
734
Symbol(LSP.
SymbolKind
.Struct, "Wrapper<T>", "Wrapper<T>", "struct", "structSelection", testLspServer,
735
Symbol(LSP.
SymbolKind
.Field, "Value : T", "Value : T", "field", "fieldSelection", testLspServer))
754
Symbol(LSP.
SymbolKind
.Class, "Result<T>", "Result<T>", "record", "recordSelection", testLspServer)
773
Symbol(LSP.
SymbolKind
.Method, "Func<T, TResult>(T) : TResult", "Func<T, TResult>(T) : TResult", "delegate", "delegateSelection", testLspServer)
834
LSP.
SymbolKind
kind,
Symbols\WorkspaceSymbolsTests.cs (10)
50
CreateSymbolInformation(LSP.
SymbolKind
.Class, "A", testLspServer.GetLocations("class").Single(), Glyph.ClassInternal, GetContainerName(testLspServer.GetCurrentSolution()))
72
CreateSymbolInformation(LSP.
SymbolKind
.Class, "A", testLspServer.GetLocations("class").Single(), Glyph.ClassInternal, GetContainerName(testLspServer.GetCurrentSolution()))
100
CreateSymbolInformation(LSP.
SymbolKind
.Method, "M", testLspServer.GetLocations("method").Single(), Glyph.MethodPrivate, GetContainerName(testLspServer.GetCurrentSolution(), "A"))
125
CreateSymbolInformation(LSP.
SymbolKind
.Variable, "i", testLspServer.GetLocations("local").Single(), Glyph.Local, GetContainerName(testLspServer.GetCurrentSolution(), "A.M.i"))
153
CreateSymbolInformation(LSP.
SymbolKind
.Field, "F", testLspServer.GetLocations("field")[0], Glyph.FieldPrivate, classAContainerName),
154
CreateSymbolInformation(LSP.
SymbolKind
.Class, "F", testLspServer.GetLocations("class").Single(), Glyph.ClassPrivate, classAContainerName),
155
CreateSymbolInformation(LSP.
SymbolKind
.Field, "F", testLspServer.GetLocations("field")[1], Glyph.FieldPrivate, GetContainerName(testLspServer.GetCurrentSolution(), "A.F"))
188
CreateSymbolInformation(LSP.
SymbolKind
.Method, "M", testLspServer.GetLocations("method")[0], Glyph.MethodPrivate, GetContainerName(testLspServer.GetCurrentSolution(), "A")),
189
CreateSymbolInformation(LSP.
SymbolKind
.Method, "M", testLspServer.GetLocations("method")[1], Glyph.MethodPrivate, GetContainerName(testLspServer.GetCurrentSolution(), "B"))
227
CreateSymbolInformation(LSP.
SymbolKind
.Class, "A", testLspServer.GetLocations("class").Single(), Glyph.ClassInternal, GetContainerName(testLspServer.GetCurrentSolution()))
Microsoft.VisualStudio.LanguageServices (4)
DocumentOutline\DocumentOutlineViewModel_Utilities.cs (1)
79
(Roslyn.LanguageServer.Protocol.
SymbolKind
)symbol.Kind,
DocumentOutline\DocumentSymbolData.cs (2)
11
using SymbolKind = Roslyn.LanguageServer.Protocol.
SymbolKind
;
19
SymbolKind
SymbolKind,
DocumentOutline\SortOption.cs (1)
21
/// Sort by document symbol <see cref="Roslyn.LanguageServer.Protocol.
SymbolKind
"/>.
Microsoft.VisualStudio.LanguageServices.Razor.UnitTests (14)
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Endpoints\CohostDocumentSymbolEndpointTest.cs (14)
79
Assert.Equal(
SymbolKind
.Class, classC.Kind);
86
Assert.Equal(
SymbolKind
.Method, handleString.Kind);
91
Assert.Equal(
SymbolKind
.Method, m.Kind);
96
Assert.Equal(
SymbolKind
.Method, objToString.Kind);
165
Assert.Equal(
SymbolKind
.Class, classC.Kind);
172
Assert.Equal(
SymbolKind
.Method, handleString.Kind);
177
Assert.Equal(
SymbolKind
.Method, m.Kind);
182
Assert.Equal(
SymbolKind
.Method, objToString.Kind);
240
Assert.Equal(
SymbolKind
.Method, handleString.Kind);
245
Assert.Equal(
SymbolKind
.Method, m.Kind);
250
Assert.Equal(
SymbolKind
.Method, objToString.Kind);
309
Assert.Equal(
SymbolKind
.Method, handleString.Kind);
314
Assert.Equal(
SymbolKind
.Method, m.Kind);
319
Assert.Equal(
SymbolKind
.Method, objToString.Kind);
Microsoft.VisualStudioCode.RazorExtension.UnitTests (14)
src\Razor\src\Razor\test\Microsoft.CodeAnalysis.Razor.CohostingShared.UnitTests\Endpoints\CohostDocumentSymbolEndpointTest.cs (14)
79
Assert.Equal(
SymbolKind
.Class, classC.Kind);
86
Assert.Equal(
SymbolKind
.Method, handleString.Kind);
91
Assert.Equal(
SymbolKind
.Method, m.Kind);
96
Assert.Equal(
SymbolKind
.Method, objToString.Kind);
165
Assert.Equal(
SymbolKind
.Class, classC.Kind);
172
Assert.Equal(
SymbolKind
.Method, handleString.Kind);
177
Assert.Equal(
SymbolKind
.Method, m.Kind);
182
Assert.Equal(
SymbolKind
.Method, objToString.Kind);
240
Assert.Equal(
SymbolKind
.Method, handleString.Kind);
245
Assert.Equal(
SymbolKind
.Method, m.Kind);
250
Assert.Equal(
SymbolKind
.Method, objToString.Kind);
309
Assert.Equal(
SymbolKind
.Method, handleString.Kind);
314
Assert.Equal(
SymbolKind
.Method, m.Kind);
319
Assert.Equal(
SymbolKind
.Method, objToString.Kind);