143 references to SymbolKind
Microsoft.CodeAnalysis.LanguageServer.Protocol (57)
Extensions\ProtocolConversions.cs (43)
618public static LSP.SymbolKind NavigateToKindToSymbolKind(string kind) 620if (Enum.TryParse<LSP.SymbolKind>(kind, out var symbolKind)) 629return LSP.SymbolKind.EnumMember; 631return LSP.SymbolKind.Struct; 633return LSP.SymbolKind.Function; 635return LSP.SymbolKind.Object; 661public static Glyph SymbolKindToGlyph(LSP.SymbolKind kind) 665case LSP.SymbolKind.File: 667case LSP.SymbolKind.Module: 669case LSP.SymbolKind.Namespace: 671case LSP.SymbolKind.Package: 673case LSP.SymbolKind.Class: 675case LSP.SymbolKind.Method: 677case LSP.SymbolKind.Property: 679case LSP.SymbolKind.Field: 681case LSP.SymbolKind.Constructor: 683case LSP.SymbolKind.Enum: 685case LSP.SymbolKind.Interface: 687case LSP.SymbolKind.Function: 689case LSP.SymbolKind.Variable: 691case LSP.SymbolKind.Constant: 692case LSP.SymbolKind.Number: 694case LSP.SymbolKind.String: 695case LSP.SymbolKind.Boolean: 696case LSP.SymbolKind.Array: 697case LSP.SymbolKind.Object: 698case LSP.SymbolKind.Key: 699case LSP.SymbolKind.Null: 701case LSP.SymbolKind.EnumMember: 703case LSP.SymbolKind.Struct: 705case LSP.SymbolKind.Event: 707case LSP.SymbolKind.Operator: 709case LSP.SymbolKind.TypeParameter: 716public static LSP.SymbolKind GlyphToSymbolKind(Glyph glyph) 725if (Enum.TryParse<LSP.SymbolKind>(glyphString, out var symbolKind)) 736return LSP.SymbolKind.Package; 739return LSP.SymbolKind.File; 748return LSP.SymbolKind.Method; 753return LSP.SymbolKind.Variable; 758return LSP.SymbolKind.Struct; 760return LSP.SymbolKind.Object;
Handler\Symbols\DocumentSymbolsHandler.cs (1)
130var kind = ProtocolConversions.GlyphToSymbolKind(item.Glyph);
Handler\Symbols\SymbolInformationFactory.cs (1)
12public 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. 47public 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)
30public SymbolKind Kind { get; init; }
Protocol\Navigation\TypeHierarchyItem.cs (1)
30public SymbolKind Kind { get; init; }
Protocol\SymbolInformation.cs (2)
40/// Gets or sets the <see cref="SymbolKind"/> of this symbol. 44public 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 28public SymbolKind[]? ValueSet
Protocol\WorkspaceSymbol.cs (1)
30public SymbolKind Kind { get; init; }
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (82)
Symbols\DocumentSymbolsTests.cs (4)
43CreateSymbolInformation(LSP.SymbolKind.Class, "Test.A", testLspServer.GetLocations("class").Single(), Glyph.ClassInternal), 44CreateSymbolInformation(LSP.SymbolKind.Method, "A()", testLspServer.GetLocations("constructor").Single(), Glyph.MethodPublic, "Test.A"), 45CreateSymbolInformation(LSP.SymbolKind.Method, "M()", testLspServer.GetLocations("method").Single(), Glyph.MethodPrivate, "Test.A"), 46CreateSymbolInformation(LSP.SymbolKind.Operator, "operator +(A a1, A a2)", testLspServer.GetLocations("operator").Single(), Glyph.OperatorPrivate, "Test.A"),
Symbols\DocumentSymbolsTests.Hierarchical.cs (68)
40Symbol(LSP.SymbolKind.Namespace, "Test", "Test", "namespace", "namespaceSelection", testLspServer, 41Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 42Symbol(LSP.SymbolKind.Method, "A()", "A()", "constructor", "constructorSelection", testLspServer), 43Symbol(LSP.SymbolKind.Method, "M() : void", "M() : void", "method", "methodSelection", testLspServer), 44Symbol(LSP.SymbolKind.Operator, "operator +(A, A) : A", "operator +(A, A) : A", "operator", "operatorSelection", testLspServer))) 66Symbol(LSP.SymbolKind.Namespace, "NamespaceA", "NamespaceA", "namespace", "namespaceSelection", testLspServer, 67Symbol(LSP.SymbolKind.Class, ".", "", "class", "classSelection", testLspServer)) 89Symbol(LSP.SymbolKind.Namespace, ".", "", "namespace", "namespaceSelection", testLspServer) 110Symbol(LSP.SymbolKind.Namespace, "One.Two.Three", "One.Two.Three", "namespace", "namespaceSelection", testLspServer) 140Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 141Symbol(LSP.SymbolKind.Method, "M() : void", "M() : void", "method", "methodSelection", testLspServer, 142Symbol(LSP.SymbolKind.Method, "LocalFunction(string) : int", "LocalFunction(string) : int", "localFunction", "localFunctionSelection", testLspServer, 143Symbol(LSP.SymbolKind.Method, "NestedLocal() : void", "NestedLocal() : void", "nestedLocal", "nestedLocalSelection", testLspServer)))) 170Symbol(LSP.SymbolKind.Namespace, "Outer", "Outer", "outerNamespace", "outerNamespaceSelection", testLspServer, 171Symbol(LSP.SymbolKind.Namespace, "Inner", "Inner", "innerNamespace", "innerNamespaceSelection", testLspServer, 172Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer))) 196Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 197Symbol(LSP.SymbolKind.Method, "M() : void", "M() : void", "method", "methodSelection", testLspServer)) 228Symbol(LSP.SymbolKind.Class, "A", "A", "classA", "classASelection", testLspServer, 229Symbol(LSP.SymbolKind.Method, "M() : void", "M() : void", "methodA", "methodASelection", testLspServer)), 230Symbol(LSP.SymbolKind.Class, "B", "B", "classB", "classBSelection", testLspServer, 231Symbol(LSP.SymbolKind.Method, "N() : void", "N() : void", "methodB", "methodBSelection", testLspServer)) 256Symbol(LSP.SymbolKind.Class, "Outer", "Outer", "class", "classSelection", testLspServer, 257Symbol(LSP.SymbolKind.Enum, "Bar", "Bar", "nestedEnum", "nestedEnumSelection", testLspServer, 258Symbol(LSP.SymbolKind.EnumMember, "None", "None", "enumMember", "enumMemberSelection", testLspServer))) 281Symbol(LSP.SymbolKind.Namespace, "Test", "Test", "namespace", "namespaceSelection", testLspServer, 282Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer)) 304Symbol(LSP.SymbolKind.Struct, "MyStruct", "MyStruct", "struct", "structSelection", testLspServer, 305Symbol(LSP.SymbolKind.Field, "Value : int", "Value : int", "field", "fieldSelection", testLspServer)) 327Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 328Symbol(LSP.SymbolKind.Field, "a : int", "a : int", "fieldA", "fieldASelection", testLspServer), 329Symbol(LSP.SymbolKind.Field, "b : int", "b : int", "fieldB", "fieldBSelection", testLspServer), 330Symbol(LSP.SymbolKind.Field, "c : int", "c : int", "fieldC", "fieldCSelection", testLspServer)) 352Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 353Symbol(LSP.SymbolKind.Event, "A : EventHandler", "A : EventHandler", "eventA", "eventASelection", testLspServer), 354Symbol(LSP.SymbolKind.Event, "B : EventHandler", "B : EventHandler", "eventB", "eventBSelection", testLspServer)) 373Symbol(LSP.SymbolKind.Class, "Person", "Person", "record", "recordSelection", testLspServer) 392Symbol(LSP.SymbolKind.Struct, "Point", "Point", "record", "recordSelection", testLspServer) 414Symbol(LSP.SymbolKind.Interface, "IMyInterface", "IMyInterface", "interface", "interfaceSelection", testLspServer, 415Symbol(LSP.SymbolKind.Method, "DoSomething() : void", "DoSomething() : void", "method", "methodSelection", testLspServer)) 434Symbol(LSP.SymbolKind.Method, "MyDelegate(int) : void", "MyDelegate(int) : void", "delegate", "delegateSelection", testLspServer) 458Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 459Symbol(LSP.SymbolKind.Method, "~A()", "~A()", "destructor", "destructorSelection", testLspServer)) 481Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 482Symbol(LSP.SymbolKind.Property, "Value : int", "Value : int", "property", "propertySelection", testLspServer)) 504Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 505Symbol(LSP.SymbolKind.Property, "this[int] : int", "this[int] : int", "indexer", "indexerSelection", testLspServer)) 531Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 532Symbol(LSP.SymbolKind.Event, "MyEvent : EventHandler", "MyEvent : EventHandler", "event", "eventSelection", testLspServer)) 554Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 555Symbol(LSP.SymbolKind.Event, "MyEvent : EventHandler", "MyEvent : EventHandler", "eventField", "eventFieldSelection", testLspServer)) 577Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 578Symbol(LSP.SymbolKind.Operator, "implicit operator int(A)", "implicit operator int(A)", "operator", "operatorSelection", testLspServer)) 600Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 601Symbol(LSP.SymbolKind.Operator, "explicit operator int(A)", "explicit operator int(A)", "operator", "operatorSelection", testLspServer)) 623Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 624Symbol(LSP.SymbolKind.Constant, "MaxValue : int", "MaxValue : int", "const", "constSelection", testLspServer)) 645Symbol(LSP.SymbolKind.Class, "MyClass<T>", "MyClass<T>", "class", "classSelection", testLspServer) 666Symbol(LSP.SymbolKind.Class, "Dictionary<TKey, TValue>", "Dictionary<TKey, TValue>", "class", "classSelection", testLspServer) 688Symbol(LSP.SymbolKind.Class, "A", "A", "class", "classSelection", testLspServer, 689Symbol(LSP.SymbolKind.Method, "GetValue<T>(T) : T", "GetValue<T>(T) : T", "method", "methodSelection", testLspServer)) 711Symbol(LSP.SymbolKind.Interface, "IRepository<T>", "IRepository<T>", "interface", "interfaceSelection", testLspServer, 712Symbol(LSP.SymbolKind.Method, "GetById(int) : T", "GetById(int) : T", "method", "methodSelection", testLspServer)) 734Symbol(LSP.SymbolKind.Struct, "Wrapper<T>", "Wrapper<T>", "struct", "structSelection", testLspServer, 735Symbol(LSP.SymbolKind.Field, "Value : T", "Value : T", "field", "fieldSelection", testLspServer)) 754Symbol(LSP.SymbolKind.Class, "Result<T>", "Result<T>", "record", "recordSelection", testLspServer) 773Symbol(LSP.SymbolKind.Method, "Func<T, TResult>(T) : TResult", "Func<T, TResult>(T) : TResult", "delegate", "delegateSelection", testLspServer) 834LSP.SymbolKind kind,
Symbols\WorkspaceSymbolsTests.cs (10)
50CreateSymbolInformation(LSP.SymbolKind.Class, "A", testLspServer.GetLocations("class").Single(), Glyph.ClassInternal, GetContainerName(testLspServer.GetCurrentSolution())) 72CreateSymbolInformation(LSP.SymbolKind.Class, "A", testLspServer.GetLocations("class").Single(), Glyph.ClassInternal, GetContainerName(testLspServer.GetCurrentSolution())) 100CreateSymbolInformation(LSP.SymbolKind.Method, "M", testLspServer.GetLocations("method").Single(), Glyph.MethodPrivate, GetContainerName(testLspServer.GetCurrentSolution(), "A")) 125CreateSymbolInformation(LSP.SymbolKind.Variable, "i", testLspServer.GetLocations("local").Single(), Glyph.Local, GetContainerName(testLspServer.GetCurrentSolution(), "A.M.i")) 153CreateSymbolInformation(LSP.SymbolKind.Field, "F", testLspServer.GetLocations("field")[0], Glyph.FieldPrivate, classAContainerName), 154CreateSymbolInformation(LSP.SymbolKind.Class, "F", testLspServer.GetLocations("class").Single(), Glyph.ClassPrivate, classAContainerName), 155CreateSymbolInformation(LSP.SymbolKind.Field, "F", testLspServer.GetLocations("field")[1], Glyph.FieldPrivate, GetContainerName(testLspServer.GetCurrentSolution(), "A.F")) 188CreateSymbolInformation(LSP.SymbolKind.Method, "M", testLspServer.GetLocations("method")[0], Glyph.MethodPrivate, GetContainerName(testLspServer.GetCurrentSolution(), "A")), 189CreateSymbolInformation(LSP.SymbolKind.Method, "M", testLspServer.GetLocations("method")[1], Glyph.MethodPrivate, GetContainerName(testLspServer.GetCurrentSolution(), "B")) 227CreateSymbolInformation(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)
11using SymbolKind = Roslyn.LanguageServer.Protocol.SymbolKind; 19SymbolKind SymbolKind,
DocumentOutline\SortOption.cs (1)
21/// Sort by document symbol <see cref="Roslyn.LanguageServer.Protocol.SymbolKind"/>.