src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (20)
62new SymbolKindOrTypeKind(TypeKind.Class),
63new SymbolKindOrTypeKind(TypeKind.Struct),
64new SymbolKindOrTypeKind(TypeKind.Interface),
65new SymbolKindOrTypeKind(TypeKind.Delegate),
66new SymbolKindOrTypeKind(TypeKind.Enum),
67new SymbolKindOrTypeKind(TypeKind.Module),
68new SymbolKindOrTypeKind(TypeKind.Pointer),
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
293foreach (var typeKindElement in symbolKindListElement.Elements(nameof(TypeKind)))
344public SymbolKindOrTypeKind(TypeKind typeKind)
355public TypeKind? TypeKind => (_category == SymbolCategory.Type) ? (TypeKind)_kind : null;
362SymbolCategory.Type => symbol is ITypeSymbol type && type.TypeKind == (TypeKind)_kind,
371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)),
376private static string GetTypeKindString(TypeKind typeKind)
383CodeAnalysis.TypeKind.Structure => nameof(CodeAnalysis.TypeKind.Struct),
433=> new((TypeKind)Enum.Parse(typeof(TypeKind), typeKindElement.Value));
441public static implicit operator SymbolKindOrTypeKind(TypeKind symbolKind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (20)
62new SymbolKindOrTypeKind(TypeKind.Class),
63new SymbolKindOrTypeKind(TypeKind.Struct),
64new SymbolKindOrTypeKind(TypeKind.Interface),
65new SymbolKindOrTypeKind(TypeKind.Delegate),
66new SymbolKindOrTypeKind(TypeKind.Enum),
67new SymbolKindOrTypeKind(TypeKind.Module),
68new SymbolKindOrTypeKind(TypeKind.Pointer),
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
293foreach (var typeKindElement in symbolKindListElement.Elements(nameof(TypeKind)))
344public SymbolKindOrTypeKind(TypeKind typeKind)
355public TypeKind? TypeKind => (_category == SymbolCategory.Type) ? (TypeKind)_kind : null;
362SymbolCategory.Type => symbol is ITypeSymbol type && type.TypeKind == (TypeKind)_kind,
371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)),
376private static string GetTypeKindString(TypeKind typeKind)
383CodeAnalysis.TypeKind.Structure => nameof(CodeAnalysis.TypeKind.Struct),
433=> new((TypeKind)Enum.Parse(typeof(TypeKind), typeKindElement.Value));
441public static implicit operator SymbolKindOrTypeKind(TypeKind symbolKind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (20)
62new SymbolKindOrTypeKind(TypeKind.Class),
63new SymbolKindOrTypeKind(TypeKind.Struct),
64new SymbolKindOrTypeKind(TypeKind.Interface),
65new SymbolKindOrTypeKind(TypeKind.Delegate),
66new SymbolKindOrTypeKind(TypeKind.Enum),
67new SymbolKindOrTypeKind(TypeKind.Module),
68new SymbolKindOrTypeKind(TypeKind.Pointer),
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
293foreach (var typeKindElement in symbolKindListElement.Elements(nameof(TypeKind)))
344public SymbolKindOrTypeKind(TypeKind typeKind)
355public TypeKind? TypeKind => (_category == SymbolCategory.Type) ? (TypeKind)_kind : null;
362SymbolCategory.Type => symbol is ITypeSymbol type && type.TypeKind == (TypeKind)_kind,
371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)),
376private static string GetTypeKindString(TypeKind typeKind)
383CodeAnalysis.TypeKind.Structure => nameof(CodeAnalysis.TypeKind.Struct),
433=> new((TypeKind)Enum.Parse(typeof(TypeKind), typeKindElement.Value));
441public static implicit operator SymbolKindOrTypeKind(TypeKind symbolKind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (20)
62new SymbolKindOrTypeKind(TypeKind.Class),
63new SymbolKindOrTypeKind(TypeKind.Struct),
64new SymbolKindOrTypeKind(TypeKind.Interface),
65new SymbolKindOrTypeKind(TypeKind.Delegate),
66new SymbolKindOrTypeKind(TypeKind.Enum),
67new SymbolKindOrTypeKind(TypeKind.Module),
68new SymbolKindOrTypeKind(TypeKind.Pointer),
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
293foreach (var typeKindElement in symbolKindListElement.Elements(nameof(TypeKind)))
344public SymbolKindOrTypeKind(TypeKind typeKind)
355public TypeKind? TypeKind => (_category == SymbolCategory.Type) ? (TypeKind)_kind : null;
362SymbolCategory.Type => symbol is ITypeSymbol type && type.TypeKind == (TypeKind)_kind,
371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)),
376private static string GetTypeKindString(TypeKind typeKind)
383CodeAnalysis.TypeKind.Structure => nameof(CodeAnalysis.TypeKind.Struct),
433=> new((TypeKind)Enum.Parse(typeof(TypeKind), typeKindElement.Value));
441public static implicit operator SymbolKindOrTypeKind(TypeKind symbolKind)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (2)
24protected abstract bool TryInitializeImplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, [NotNullWhen(true)] out IMethodSymbol? methodSymbol, [NotNullWhen(true)] out INamedTypeSymbol? typeToGenerateIn);
25protected abstract bool TryInitializeExplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, [NotNullWhen(true)] out IMethodSymbol? methodSymbol, [NotNullWhen(true)] out INamedTypeSymbol? typeToGenerateIn);
Binder\Binder_Conversions.cs (26)
800case TypeKind.Enum:
801case TypeKind.Struct:
802case TypeKind.Class when !type.IsAnonymousType: // We don't want to enable object creation with unspeakable types
804case TypeKind.TypeParameter:
806case TypeKind.Delegate:
808case TypeKind.Interface:
810case TypeKind.Array:
811case TypeKind.Class:
812case TypeKind.Dynamic:
814goto case TypeKind.Error;
815case TypeKind.Pointer:
816case TypeKind.FunctionPointer:
818goto case TypeKind.Error;
819case TypeKind.Error:
3309Debug.Assert(delegateType is NamedTypeSymbol { TypeKind: TypeKind.Delegate, DelegateInvokeMethod: { HasUseSiteError: false } }
3310|| delegateType.TypeKind == TypeKind.FunctionPointer,
3426static bool hasConversion(TypeKind targetKind, Conversions conversions, TypeSymbol source, TypeSymbol destination,
3447return targetKind == TypeKind.FunctionPointer
3452static ErrorCode getMethodMismatchErrorCode(TypeKind type)
3455TypeKind.Delegate => ErrorCode.ERR_MethDelegateMismatch,
3456TypeKind.FunctionPointer => ErrorCode.ERR_MethFuncPtrMismatch,
3460static ErrorCode getRefMismatchErrorCode(TypeKind type)
3463TypeKind.Delegate => ErrorCode.ERR_DelegateRefMismatch,
3464TypeKind.FunctionPointer => ErrorCode.ERR_FuncPtrRefMismatch,
3500Debug.Assert(Conversions.IsAssignableFromMulticastDelegate(delegateOrFuncPtrType, ref discardedUseSiteInfo) || delegateOrFuncPtrType.TypeKind == TypeKind.Delegate || delegateOrFuncPtrType.TypeKind == TypeKind.FunctionPointer);
Symbols\TypeSymbolExtensions.cs (71)
72if (type.TypeKind != TypeKind.TypeParameter)
118if (type.TypeKind == TypeKind.TypeParameter)
223return type.TypeKind == TypeKind.Enum;
318case TypeKind.Pointer:
319case TypeKind.Dynamic:
320case TypeKind.FunctionPointer:
329return type is { IsValueType: true, TypeKind: not TypeKind.TypeParameter };
341return type.TypeKind == TypeKind.Class;
347return type.TypeKind == TypeKind.Struct;
363return type.TypeKind == TypeKind.Dynamic;
369return type.TypeKind == TypeKind.TypeParameter;
375return type.TypeKind == TypeKind.Array;
381return type.TypeKind == TypeKind.Array && ((ArrayTypeSymbol)type).IsSZArray;
424return type.TypeKind == TypeKind.FunctionPointer;
431case TypeKind.Pointer:
432case TypeKind.FunctionPointer:
444case TypeKind.Class:
445case TypeKind.Struct:
448case TypeKind.TypeParameter:
594return type.TypeKind == TypeKind.Delegate;
730case TypeKind.Class:
731case TypeKind.Struct:
732case TypeKind.Interface:
733case TypeKind.Enum:
734case TypeKind.Delegate:
735case TypeKind.Submission:
805case TypeKind.Class:
806case TypeKind.Struct:
807case TypeKind.Interface:
808case TypeKind.Enum:
809case TypeKind.Delegate:
824case TypeKind.Submission:
863case TypeKind.Dynamic:
864case TypeKind.TypeParameter:
865case TypeKind.Submission:
866case TypeKind.Enum:
876goto case TypeKind.Delegate;
878case TypeKind.Error:
879case TypeKind.Class:
880case TypeKind.Struct:
881case TypeKind.Interface:
882case TypeKind.Delegate:
883case TypeKind.Extension:
951case TypeKind.Array:
955case TypeKind.Pointer:
959case TypeKind.FunctionPointer:
1194if (ReferenceEquals(parent2.OriginalDefinition, parent1OriginalDefinition) || parent1OriginalDefinition.TypeKind == TypeKind.Submission && parent2.TypeKind == TypeKind.Submission)
1234(type, parameter, unused) => type.TypeKind == TypeKind.TypeParameter && (parameter is null || TypeSymbol.Equals(type, parameter, TypeCompareKind.ConsiderEverything2));
1245(type, typeParameterContainer, unused) => type.TypeKind == TypeKind.TypeParameter && (object)type.ContainingSymbol == (object)typeParameterContainer;
1254(type, parameters, unused) => type.TypeKind == TypeKind.TypeParameter && parameters.Contains((TypeParameterSymbol)type);
1263(type, _, _) => type.TypeKind == TypeKind.TypeParameter && type.ContainingSymbol is MethodSymbol;
1274private static readonly Func<TypeSymbol, object?, bool, bool> s_containsDynamicPredicate = (type, unused1, unused2) => type.TypeKind == TypeKind.Dynamic;
1312type.VisitType((TypeSymbol t, object? _, bool _) => t.TypeKind is TypeKind.Pointer or TypeKind.FunctionPointer, null) is object;
1340internal static TypeKind GetNonErrorTypeKindGuess(this TypeSymbol type)
1539case TypeKind.Struct:
1542case TypeKind.Array:
1543case TypeKind.Class:
1544case TypeKind.Delegate:
1545case TypeKind.Dynamic:
1546case TypeKind.Error:
1547case TypeKind.Interface:
1548case TypeKind.Pointer:
1549case TypeKind.FunctionPointer:
1552case TypeKind.Enum:
1555case TypeKind.TypeParameter:
1558case TypeKind.Submission:
1699return type.IsReferenceType && type.TypeKind != TypeKind.TypeParameter;
1707return type.IsValueType && type.TypeKind != TypeKind.TypeParameter;
2032if (taskType.TypeKind == TypeKind.Error)
Completion\Providers\ImportCompletionProvider\ExtensionMemberImportCompletionHelper.SymbolComputer_Constraints.cs (5)
31=> CheckConstraints(receiverTypeSymbol, typeParameter, TypeKind.Interface, static type => type.GetAllInterfacesIncludingThis());
34=> CheckConstraints(receiverTypeSymbol, typeParameter, TypeKind.Class, static type => type.GetBaseTypesAndThis());
38TypeKind typeKind,
68TypeKind constraintTypeKind,
105ITypeSymbol type, TypeKind typeKind, Func<ITypeSymbol, IEnumerable<ITypeSymbol>> getInheritanceTypes)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (2)
24protected abstract bool TryInitializeImplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, [NotNullWhen(true)] out IMethodSymbol? methodSymbol, [NotNullWhen(true)] out INamedTypeSymbol? typeToGenerateIn);
25protected abstract bool TryInitializeExplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, [NotNullWhen(true)] out IMethodSymbol? methodSymbol, [NotNullWhen(true)] out INamedTypeSymbol? typeToGenerateIn);
Binding\Binder_Lookup.vb (35)
16Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
580Case TypeKind.Class, TypeKind.Module, TypeKind.Structure, TypeKind.Delegate, TypeKind.Array, TypeKind.Enum
583Case TypeKind.Submission
586Case TypeKind.Interface
589Case TypeKind.TypeParameter
592Case TypeKind.Error
606Case TypeKind.Class, TypeKind.Structure, TypeKind.Delegate, TypeKind.Array, TypeKind.Enum
609Case TypeKind.Module
612Case TypeKind.Submission
615Case TypeKind.Interface
618Case TypeKind.TypeParameter
621Case TypeKind.Error
931Case TypeKind.Class, TypeKind.Module, TypeKind.Structure
936Case TypeKind.Interface
941Case TypeKind.TypeParameter
1092Case TypeKind.Class, TypeKind.Module, TypeKind.Structure
1104Case TypeKind.Interface
1116Case TypeKind.TypeParameter
1697Case TypeKind.Interface
1710Case TypeKind.TypeParameter
1964(container.TypeKind = TypeKind.Class OrElse container.TypeKind = TypeKind.Structure) AndAlso
Compilation\ClsComplianceChecker.vb (26)
186If symbol.TypeKind = TypeKind.Delegate Then
340ElseIf symbol.TypeKind = TypeKind.Enum Then
439If type.TypeKind = TypeKind.Delegate AndAlso type.IsImplicitlyDeclared AndAlso TryCast(type, NamedTypeSymbol)?.AssociatedSymbol Is symbol Then
591Case TypeKind.Array
593Case TypeKind.Error, TypeKind.TypeParameter
595Case TypeKind.Class, TypeKind.Structure, TypeKind.Interface, TypeKind.Delegate, TypeKind.Enum, TypeKind.Submission, TypeKind.Module
617Case TypeKind.Array
619Case TypeKind.Error, TypeKind.TypeParameter
621Case TypeKind.Class, TypeKind.Structure, TypeKind.Interface, TypeKind.Delegate, TypeKind.Enum, TypeKind.Submission, TypeKind.Module
636If type.TypeKind = TypeKind.Error Then
892Dim typeKind As TypeKind = xType.TypeKind
897If typeKind = TypeKind.Array Then
Symbols\Source\SourceNamedTypeSymbol.vb (40)
18Imports TypeKind = Microsoft.CodeAnalysis.TypeKind
247If TypeKind = TypeKind.Delegate Then
275ElseIf TypeKind = TypeKind.Enum Then
1117Case TypeKind.TypeParameter
1121Case TypeKind.Interface, TypeKind.Enum, TypeKind.Delegate, TypeKind.Structure, TypeKind.Module, TypeKind.Array ' array can't really occur
1125Case TypeKind.Error, TypeKind.Unknown
1128Case TypeKind.Class
1188Case TypeKind.TypeParameter
1192Case TypeKind.Unknown
1195Case TypeKind.Interface, TypeKind.Error
1239Case TypeKind.TypeParameter
1243Case TypeKind.Unknown
1246Case TypeKind.Interface, TypeKind.Error
1382Case TypeKind.Submission
1388Case TypeKind.Class
1391Case TypeKind.Interface
1394Case TypeKind.Enum
1397Case TypeKind.Structure
1400Case TypeKind.Delegate
1403Case TypeKind.Module
1510Debug.Assert(Me.TypeKind <> TypeKind.Interface)
1512If TypeKind = TypeKind.Enum Then
1515ElseIf TypeKind = TypeKind.Delegate Then
1724TypeKind <> TypeKind.Class OrElse
2267Case TypeKind.Class
2294Case TypeKind.Interface
2314Case TypeKind.Module
2349Dim defaultAutoLayoutSize = If(Me.TypeKind = TypeKind.Structure, 1, 0)
2484If Me.TypeKind = TypeKind.Module Then
2539If Me.TypeKind = TypeKind.Structure Then
2589If Me.TypeKind = TypeKind.Module Then
2735If Me.TypeKind = TypeKind.Class AndAlso Not Me.IsGenericType Then
Symbols\TypeSymbolExtensions.vb (46)
118Return type.TypeKind = TypeKind.Enum
140Return type.TypeKind = TypeKind.Class
146Return type.TypeKind = TypeKind.Structure
152Return type.TypeKind = TypeKind.Module
233Return type.TypeKind = TypeKind.Delegate
410Case TypeKind.Array, TypeKind.Delegate, TypeKind.Enum, TypeKind.Structure, TypeKind.Module
412Case TypeKind.Interface, TypeKind.TypeParameter, TypeKind.Unknown
414Case TypeKind.Error, TypeKind.Class, TypeKind.Submission
635Case TypeKind.Array
637Case TypeKind.TypeParameter
735fieldType.TypeKind = TypeKind.Enum
746If type.TypeKind = TypeKind.TypeParameter Then
761Return (type.TypeKind = TypeKind.TypeParameter) AndAlso
774Return (type.TypeKind = TypeKind.TypeParameter) AndAlso
790Private ReadOnly s_isTypeParameterFunc As Func(Of TypeSymbol, Object, Boolean) = Function(type, arg) (type.TypeKind = TypeKind.TypeParameter)
830Case TypeKind.Class,
831TypeKind.Struct,
832TypeKind.Interface,
833TypeKind.Enum,
834TypeKind.Delegate
845Case TypeKind.Submission
855Case TypeKind.Dynamic,
856TypeKind.TypeParameter,
857TypeKind.Submission,
858TypeKind.Enum,
859TypeKind.Module
863Case TypeKind.Class,
864TypeKind.Struct,
865TypeKind.Interface,
866TypeKind.Delegate,
867TypeKind.Error
883Case TypeKind.Array
1060If type.TypeKind = TypeKind.Class Then
1066If typeArgument.TypeKind = TypeKind.Delegate Then
1082If type.TypeKind = TypeKind.Delegate Then
1096If type.TypeKind = TypeKind.Delegate Then
1131If type.TypeKind = TypeKind.TypeParameter Then
1139If type.TypeKind = TypeKind.TypeParameter Then
Classification\ClassificationExtensions.cs (11)
12TypeKind.Class => type.IsRecord ? ClassificationTypeNames.RecordClassName : ClassificationTypeNames.ClassName,
13TypeKind.Module => ClassificationTypeNames.ModuleName,
14TypeKind.Struct => type.IsRecord ? ClassificationTypeNames.RecordStructName : ClassificationTypeNames.StructName,
15TypeKind.Interface => ClassificationTypeNames.InterfaceName,
16TypeKind.Enum => ClassificationTypeNames.EnumName,
17TypeKind.Delegate => ClassificationTypeNames.DelegateName,
18TypeKind.TypeParameter => ClassificationTypeNames.TypeParameterName,
19TypeKind.Dynamic => ClassificationTypeNames.Keyword,
20TypeKind.Array => ClassificationTypeNames.ArrayName,
21TypeKind.Pointer => ClassificationTypeNames.PointerName,
22TypeKind.FunctionPointer => ClassificationTypeNames.FunctionPointerName,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (20)
62new SymbolKindOrTypeKind(TypeKind.Class),
63new SymbolKindOrTypeKind(TypeKind.Struct),
64new SymbolKindOrTypeKind(TypeKind.Interface),
65new SymbolKindOrTypeKind(TypeKind.Delegate),
66new SymbolKindOrTypeKind(TypeKind.Enum),
67new SymbolKindOrTypeKind(TypeKind.Module),
68new SymbolKindOrTypeKind(TypeKind.Pointer),
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
293foreach (var typeKindElement in symbolKindListElement.Elements(nameof(TypeKind)))
344public SymbolKindOrTypeKind(TypeKind typeKind)
355public TypeKind? TypeKind => (_category == SymbolCategory.Type) ? (TypeKind)_kind : null;
362SymbolCategory.Type => symbol is ITypeSymbol type && type.TypeKind == (TypeKind)_kind,
371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)),
376private static string GetTypeKindString(TypeKind typeKind)
383CodeAnalysis.TypeKind.Structure => nameof(CodeAnalysis.TypeKind.Struct),
433=> new((TypeKind)Enum.Parse(typeof(TypeKind), typeKindElement.Value));
441public static implicit operator SymbolKindOrTypeKind(TypeKind symbolKind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (20)
62new SymbolKindOrTypeKind(TypeKind.Class),
63new SymbolKindOrTypeKind(TypeKind.Struct),
64new SymbolKindOrTypeKind(TypeKind.Interface),
65new SymbolKindOrTypeKind(TypeKind.Delegate),
66new SymbolKindOrTypeKind(TypeKind.Enum),
67new SymbolKindOrTypeKind(TypeKind.Module),
68new SymbolKindOrTypeKind(TypeKind.Pointer),
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
293foreach (var typeKindElement in symbolKindListElement.Elements(nameof(TypeKind)))
344public SymbolKindOrTypeKind(TypeKind typeKind)
355public TypeKind? TypeKind => (_category == SymbolCategory.Type) ? (TypeKind)_kind : null;
362SymbolCategory.Type => symbol is ITypeSymbol type && type.TypeKind == (TypeKind)_kind,
371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)),
376private static string GetTypeKindString(TypeKind typeKind)
383CodeAnalysis.TypeKind.Structure => nameof(CodeAnalysis.TypeKind.Struct),
433=> new((TypeKind)Enum.Parse(typeof(TypeKind), typeKindElement.Value));
441public static implicit operator SymbolKindOrTypeKind(TypeKind symbolKind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (20)
62new SymbolKindOrTypeKind(TypeKind.Class),
63new SymbolKindOrTypeKind(TypeKind.Struct),
64new SymbolKindOrTypeKind(TypeKind.Interface),
65new SymbolKindOrTypeKind(TypeKind.Delegate),
66new SymbolKindOrTypeKind(TypeKind.Enum),
67new SymbolKindOrTypeKind(TypeKind.Module),
68new SymbolKindOrTypeKind(TypeKind.Pointer),
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
293foreach (var typeKindElement in symbolKindListElement.Elements(nameof(TypeKind)))
344public SymbolKindOrTypeKind(TypeKind typeKind)
355public TypeKind? TypeKind => (_category == SymbolCategory.Type) ? (TypeKind)_kind : null;
362SymbolCategory.Type => symbol is ITypeSymbol type && type.TypeKind == (TypeKind)_kind,
371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)),
376private static string GetTypeKindString(TypeKind typeKind)
383CodeAnalysis.TypeKind.Structure => nameof(CodeAnalysis.TypeKind.Struct),
433=> new((TypeKind)Enum.Parse(typeof(TypeKind), typeKindElement.Value));
441public static implicit operator SymbolKindOrTypeKind(TypeKind symbolKind)