290 references to Enum
ILLink.RoslynAnalyzer (3)
TrimAnalysis\SingleValueExtensions.cs (1)
24 TypeKind.Class or TypeKind.Enum or TypeKind.Interface or TypeKind.Struct =>
TrimAnalysis\TrimAnalysisVisitor.cs (2)
188 (operation.Type?.TypeKind == TypeKind.Enum || operation.Type?.SpecialType == SpecialType.System_Int32)) { 432 } else if (operation.Type?.TypeKind == TypeKind.Enum && constantValue is int enumConstantValue) {
Microsoft.Analyzers.Extra (2)
CallAnalysis\Arrays.cs (2)
108if (keyType.TypeKind == TypeKind.Enum 112if (keyType.TypeKind == TypeKind.Enum)
Microsoft.AspNetCore.App.Analyzers (1)
src\Shared\RoslynUtils\ParsabilityHelper.cs (1)
26if (typeSymbol.TypeKind == TypeKind.Enum)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
src\Shared\RoslynUtils\ParsabilityHelper.cs (1)
26if (typeSymbol.TypeKind == TypeKind.Enum)
Microsoft.CodeAnalysis (8)
Compilation\Expression.cs (1)
41if (type.TypeKind == TypeKind.Enum)
MetadataReader\MetadataDecoder.cs (1)
1549return (type.TypeKind == TypeKind.Enum) ? TypedConstantKind.Enum : TypedConstantKind.Primitive;
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (2)
142if (type.TypeKind == TypeKind.Enum) 185if (typeSymbol.TypeKind != TypeKind.Enum)
Symbols\INamedTypeSymbolInternal.cs (2)
36if (type.TypeKind == TypeKind.Enum) 75case TypeKind.Enum:
Symbols\TypedConstant.cs (2)
143if (_type!.SpecialType == specialType || (_type.TypeKind == TypeKind.Enum && specialType == SpecialType.System_Enum)) 184case TypeKind.Enum:
Microsoft.CodeAnalysis.CodeStyle (8)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
90else if (typeWithoutNullable.TypeKind == TypeKind.Enum) 119if (type.RemoveNullableIfPresent()?.TypeKind != TypeKind.Enum)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (1)
27if (switchExpressionType?.TypeKind == TypeKind.Enum)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
68if (switchExpressionType?.TypeKind == TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
635if (type != null && type.IsValueType && type.TypeKind == TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
128private static readonly SymbolKindOrTypeKind _enum = new(TypeKind.Enum); 389case TypeKind.Enum:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
71new SymbolKindOrTypeKind(TypeKind.Enum),
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (1)
23protected static readonly ISet<TypeKind> EnumType = new HashSet<TypeKind> { TypeKind.Enum };
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
36if (typeSymbol.TypeKind != TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
152if (namedType.TypeKind != TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (1)
48public bool IsValueType => TypeKind is TypeKind.Struct or TypeKind.Enum;
Microsoft.CodeAnalysis.CSharp (58)
Binder\Binder_Constraints.cs (1)
610case TypeKind.Enum:
Binder\Binder_Crefs.cs (1)
580case TypeKind.Enum:
Binder\Binder_Expressions.cs (3)
4779if ((containingType.TypeKind == TypeKind.Enum || containingType.TypeKind == TypeKind.Struct) && initializerArgumentListOpt == null) 5155case TypeKind.Enum: 7258if (type.TypeKind == TypeKind.Enum)
Binder\Binder_Lookup.cs (2)
194case TypeKind.Enum: 1877case TypeKind.Enum:
Binder\PatternExplainer.cs (1)
649if (type is NamedTypeSymbol { TypeKind: TypeKind.Enum } e)
Binder\Semantics\Conversions\ConversionsBase.cs (1)
2181if (otherType.TypeKind == TypeKind.Enum)
Compiler\ClsComplianceChecker.cs (1)
1004case TypeKind.Enum:
Emitter\Model\NamedTypeSymbolAdapter.cs (2)
44get { return AdaptedNamedTypeSymbol.TypeKind == TypeKind.Enum; } 520case TypeKind.Enum:
Emitter\NoPia\EmbeddedType.cs (1)
159case TypeKind.Enum:
Emitter\NoPia\EmbeddedTypesManager.cs (4)
295case TypeKind.Enum: 401Debug.Assert(namedType.TypeKind == TypeKind.Struct || namedType.TypeKind == TypeKind.Enum || namedType.TypeKind == TypeKind.Delegate); 404if (namedType.TypeKind == TypeKind.Struct || namedType.TypeKind == TypeKind.Enum) 494case TypeKind.Enum:
FlowAnalysis\EmptyStructTypeCache.cs (1)
234case TypeKind.Enum:
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
603if (e.StrippedType().TypeKind == TypeKind.Enum)
SymbolDisplay\SymbolDisplayVisitor.cs (1)
467&& symbol.ContainingType.TypeKind == TypeKind.Enum
SymbolDisplay\SymbolDisplayVisitor.Members.cs (2)
62if (symbol.ContainingType.TypeKind == TypeKind.Enum) 873if (type.TypeKind == TypeKind.Enum)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (2)
608case TypeKind.Enum: 725case TypeKind.Enum:
Symbols\ConstraintsHelper.cs (3)
262case TypeKind.Enum: 1459case TypeKind.Enum: 1541case TypeKind.Enum:
Symbols\EnumConversions.cs (1)
30return TypeKind.Enum;
Symbols\Metadata\PE\MetadataDecoder.cs (1)
412case TypeKind.Enum:
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
99case TypeKind.Enum:
Symbols\Metadata\PE\PENamedTypeSymbol.cs (5)
119if (this.TypeKind == TypeKind.Enum) 985if (this.TypeKind == TypeKind.Enum) 1190&& this.TypeKind == TypeKind.Enum) 1284if (this.TypeKind == TypeKind.Enum) 1781result = TypeKind.Enum;
Symbols\NamedTypeSymbol.cs (2)
390return kind != TypeKind.Enum && kind != TypeKind.Struct && kind != TypeKind.Error; 404return kind == TypeKind.Struct || kind == TypeKind.Enum;
Symbols\Source\SourceMemberContainerSymbol.cs (4)
373case TypeKind.Enum: 1510if (this.TypeKind == TypeKind.Enum) 3251case TypeKind.Enum: 3487case TypeKind.Enum:
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
513case TypeKind.Enum:
Symbols\Source\SourceNamedTypeSymbol.cs (1)
815case TypeKind.Enum:
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (4)
44TypeKind is not (TypeKind.Enum or TypeKind.Delegate or TypeKind.Submission)) 282if (this.TypeKind == TypeKind.Enum) 662if (typeKind == TypeKind.Enum) 714if (typeKind == TypeKind.Enum)
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (2)
46if (this.TypeKind != TypeKind.Enum) 89if (this.TypeKind != TypeKind.Enum)
Symbols\Symbol_Attributes.cs (1)
76case TypeKind.Enum:
Symbols\TypeSymbolExtensions.cs (5)
222return type.TypeKind == TypeKind.Enum; 704case TypeKind.Enum: 779case TypeKind.Enum: 837case TypeKind.Enum: 1522case TypeKind.Enum:
Symbols\VarianceSafety.cs (2)
77case TypeKind.Enum: 372case TypeKind.Enum: // Can't be generic, but can be nested in generic.
Utilities\TypeSymbolExtensions.cs (1)
193case TypeKind.Enum:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
124return type.TypeKind == TypeKind.Enum &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
62if (type is INamedTypeSymbol { TypeKind: TypeKind.Enum } enumType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
186if (namedType.TypeKind == TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
3046return ((INamedTypeSymbol)symbol).TypeKind == TypeKind.Enum; 3049return target.IsType && ((ITypeSymbol)target).TypeKind == TypeKind.Enum;
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (1)
238[InlineData("enum [|c2|] { }", "enum C2 { }", TypeKind.Enum, Accessibility.Private)]
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
CodeActions\GenerateType\GenerateTypeTests_Dialog.cs (3)
436typeKind: TypeKind.Enum, 471typeKind: TypeKind.Enum, 512typeKind: TypeKind.Enum,
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (2)
344[InlineData("*", new object[] { SymbolKind.Namespace, TypeKind.Class, TypeKind.Struct, TypeKind.Interface, TypeKind.Enum, SymbolKind.Property, MethodKind.Ordinary, MethodKind.LocalFunction, SymbolKind.Field, SymbolKind.Event, TypeKind.Delegate, SymbolKind.Parameter, SymbolKind.TypeParameter, SymbolKind.Local })] 345[InlineData(null, new object[] { SymbolKind.Namespace, TypeKind.Class, TypeKind.Struct, TypeKind.Interface, TypeKind.Enum, SymbolKind.Property, MethodKind.Ordinary, MethodKind.LocalFunction, SymbolKind.Field, SymbolKind.Event, TypeKind.Delegate, SymbolKind.Parameter, SymbolKind.TypeParameter, SymbolKind.Local })]
Microsoft.CodeAnalysis.CSharp.Features (6)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (3)
129if (type.TypeKind != TypeKind.Enum) 184if (type.TypeKind == TypeKind.Enum) 292if (containingType?.TypeKind == TypeKind.Enum &&
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
2554IFieldSymbol { ContainingType.TypeKind: TypeKind.Enum }
NavigationBar\CSharpNavigationBarItemService.cs (1)
213return symbol.ContainingType.TypeKind == TypeKind.Enum
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
124return type.TypeKind == TypeKind.Enum &&
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (1)
238[InlineData("enum [|c2|] { }", "enum C2 { }", TypeKind.Enum, Accessibility.Private)]
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (11)
Semantics\NullableReferenceTypesTests.cs (4)
116620Assert.Equal(TypeKind.Enum, compilation1.GetTypeByMetadataName("B").TypeKind); 116640Assert.Equal(TypeKind.Enum, compilation2.GetTypeByMetadataName("B").TypeKind); 116651Assert.Equal(TypeKind.Enum, compilation3.GetTypeByMetadataName("B").TypeKind); 116760Assert.Equal(TypeKind.Enum, compilation7.GetTypeByMetadataName("B").TypeKind);
Semantics\ScriptSemanticsTests.cs (1)
471Assert.Equal(TypeKind.Enum, members[0].TypeKind);
Semantics\UnsafeTests.cs (1)
10698Assert.Equal(TypeKind.Enum, type.TypeKind);
Semantics\UseSiteErrorTests.cs (5)
2310Assert.Equal(TypeKind.Enum, compilation1.GetTypeByMetadataName("B").TypeKind); 2328Assert.Equal(TypeKind.Enum, compilation2.GetTypeByMetadataName("B").TypeKind); 2339Assert.Equal(TypeKind.Enum, compilation3.GetTypeByMetadataName("B").TypeKind); 2384Assert.Equal(TypeKind.Enum, compilation5.GetTypeByMetadataName("B").TypeKind); 2425Assert.Equal(TypeKind.Enum, compilation7.GetTypeByMetadataName("B").TypeKind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (16)
Compilation\GetSemanticInfoTests.cs (1)
4381Assert.Equal(TypeKind.Enum, info.Type.TypeKind);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
4748Assert.Equal(TypeKind.Enum, enumSymbol.TypeKind);
Compilation\SemanticModelGetSemanticInfoTests.cs (10)
4673Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4675Assert.Equal(TypeKind.Enum, semanticInfo.ConvertedType.TypeKind); 4711Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4713Assert.Equal(TypeKind.Enum, semanticInfo.ConvertedType.TypeKind); 4747Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4749Assert.Equal(TypeKind.Enum, semanticInfo.ConvertedType.TypeKind); 4783Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 4785Assert.Equal(TypeKind.Enum, semanticInfo.ConvertedType.TypeKind); 4814Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind); 7526Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind);
Symbols\Metadata\PE\TypeKindTests.cs (1)
75Assert.Equal(TypeKind.Enum, typeCode.TypeKind);
Symbols\MissingSpecialMember.cs (1)
309Assert.Equal(TypeKind.Enum, lookupType.TypeKind);
Symbols\Source\EnumTests.cs (1)
759Assert.Equal(TypeKind.Enum, member.Type.TypeKind);
Symbols\TypeTests.cs (1)
1708Assert.Equal(TypeKind.Enum, memType.GetNullableUnderlyingType().TypeKind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
Extensions.cs (1)
835return type.TypeKind == TypeKind.Enum ? ((INamedTypeSymbol)type).EnumUnderlyingType : type;
UsesIsNullableVisitor.cs (2)
174case TypeKind.Enum: 192case TypeKind.Enum:
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Rename\CSharpRenameRewriterLanguageService.cs (2)
802if (renamedSymbol is INamedTypeSymbol { TypeKind: not TypeKind.Enum } namedType) 807if (renamedSymbol.ContainingSymbol is INamedTypeSymbol { TypeKind: not TypeKind.Enum } containingNamedType &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
62if (type is INamedTypeSymbol { TypeKind: TypeKind.Enum } enumType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
186if (namedType.TypeKind == TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
3046return ((INamedTypeSymbol)symbol).TypeKind == TypeKind.Enum; 3049return target.IsType && ((ITypeSymbol)target).TypeKind == TypeKind.Enum;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (7)
CodeGeneration\CodeGenerationTests.CSharp.cs (3)
263[InlineData("enum", TypeKind.Enum)] 367typeKind: TypeKind.Enum); 383typeKind: TypeKind.Enum,
CodeGeneration\CodeGenerationTests.VisualBasic.cs (2)
277typeKind: TypeKind.Enum, 292typeKind: TypeKind.Enum,
SymbolFinder\DependentTypeFinderTests.cs (1)
610var enums = transitiveImpls.Where(i => i.TypeKind == TypeKind.Enum);
SymbolFinder\FindSymbolAtPositionTests.cs (1)
62Assert.Equal(TypeKind.Enum, fieldSymbol.ContainingType.TypeKind);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\PdbHelpers.cs (1)
82if (type.TypeKind == TypeKind.Enum)
Microsoft.CodeAnalysis.Features (11)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
345TypeKind.Enum => FeaturesResources.enum_, 351=> symbol.IsConst ? ((symbol.ContainingType.TypeKind == TypeKind.Enum) ? FeaturesResources.enum_value : FeaturesResources.const_field) :
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
544if (symbol.ContainingType != null && symbol.ContainingType.TypeKind == TypeKind.Enum)
Shared\Extensions\ISymbolExtensions_2.cs (2)
40if (containingType != null && containingType.TypeKind == TypeKind.Enum) 68case TypeKind.Enum:
Snippets\SnippetFunctionService.cs (1)
59if (typeSymbol?.TypeKind != TypeKind.Enum)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
90else if (typeWithoutNullable.TypeKind == TypeKind.Enum) 119if (type.RemoveNullableIfPresent()?.TypeKind != TypeKind.Enum)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (1)
27if (switchExpressionType?.TypeKind == TypeKind.Enum)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
68if (switchExpressionType?.TypeKind == TypeKind.Enum)
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (1)
23protected static readonly ISet<TypeKind> EnumType = new HashSet<TypeKind> { TypeKind.Enum };
Microsoft.CodeAnalysis.VisualBasic (63)
Binding\Binder_Expressions.vb (2)
1216Case TYPEKIND.Enum 3800Case TYPEKIND.Array, TYPEKIND.Enum
Binding\Binder_Lookup.vb (2)
580Case TypeKind.Class, TypeKind.Module, TypeKind.Structure, TypeKind.Delegate, TypeKind.Array, TypeKind.Enum 606Case TypeKind.Class, TypeKind.Structure, TypeKind.Delegate, TypeKind.Array, TypeKind.Enum
Binding\Binder_ObjectInitializer.vb (2)
241TypeKind.Enum, 325Case TypeKind.Enum, TypeKind.Structure
Binding\LookupResult.vb (1)
740If symbol1.Kind <> SymbolKind.Field OrElse symbol2.Kind <> SymbolKind.Field OrElse symbol1.ContainingType.TypeKind <> TypeKind.Enum Then
Compilation\ClsComplianceChecker.vb (3)
340ElseIf symbol.TypeKind = TypeKind.Enum Then 595Case TypeKind.Class, TypeKind.Structure, TypeKind.Interface, TypeKind.Delegate, TypeKind.Enum, TypeKind.Submission, TypeKind.Module 621Case TypeKind.Class, TypeKind.Structure, TypeKind.Interface, TypeKind.Delegate, TypeKind.Enum, TypeKind.Submission, TypeKind.Module
Compilation\DocumentationComments\DocumentationCommentCompiler.Common.vb (1)
741Case TypeKind.Enum
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (1)
132Me.TypeParamSupported = namedType.TypeKind <> TYPEKIND.Enum AndAlso namedType.TypeKind <> TYPEKIND.Module
Compilation\DocumentationComments\DocumentationCommentCompiler.NamedType.vb (2)
127If namedType.TypeKind = TypeKind.Enum Then 132ElseIf namedType.TypeKind = TypeKind.Enum OrElse namedType.TypeKind = TypeKind.Module Then
Emit\NamedTypeReference.vb (1)
48Return m_UnderlyingNamedType.TypeKind = TypeKind.Enum
Emit\NamedTypeSymbolAdapter.vb (3)
42Return AdaptedNamedTypeSymbol.TypeKind = TypeKind.Enum 455Case TypeKind.Enum, TypeKind.Interface, TypeKind.Delegate 966Case TypeKind.Module, TypeKind.Enum, TypeKind.Structure
Emit\NoPia\EmbeddedType.vb (1)
129Case TypeKind.Enum, TypeKind.Delegate, TypeKind.Interface
Emit\NoPia\EmbeddedTypesManager.vb (4)
238TypeKind.Enum, 333namedType.TypeKind = TypeKind.Enum OrElse 337If namedType.TypeKind = TypeKind.Structure OrElse namedType.TypeKind = TypeKind.Enum Then 417Case TypeKind.Structure, TypeKind.Enum
Semantics\Conversions.vb (7)
1745If destination.TypeKind = TypeKind.Enum AndAlso 1750If source.TypeKind = TypeKind.Enum AndAlso 1754ElseIf source.TypeKind = TypeKind.Enum AndAlso destination.TypeKind = TypeKind.Enum Then 3365If type.TypeKind = TypeKind.Enum Then 3784ElseIf constraint.TypeKind = TypeKind.Enum AndAlso 3948ElseIf constraint.TypeKind = TypeKind.Enum AndAlso
Semantics\OverloadResolution.vb (4)
2050left.TypeKind = TypeKind.Enum AndAlso right.TypeKind <> TypeKind.Enum Then 2066right.TypeKind = TypeKind.Enum AndAlso left.TypeKind <> TypeKind.Enum Then
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
29If symbol.ContainingType.TypeKind = TypeKind.Enum Then
SymbolDisplay\SymbolDisplayVisitor.Types.vb (2)
259Case TypeKind.Enum 451Case TypeKind.Enum
SymbolDisplay\SymbolDisplayVisitor.vb (1)
396symbol.ContainingType.TypeKind = TypeKind.Enum AndAlso
Symbols\ConstraintsHelper.vb (3)
249TypeKind.Enum, 838TypeKind.Enum, 939Case TypeKind.Enum
Symbols\Metadata\PE\MetadataDecoder.vb (1)
360TypeKind.Enum,
Symbols\Metadata\PE\PENamedTypeSymbol.vb (4)
376If _lazyEnumUnderlyingType Is Nothing AndAlso TypeKind = TypeKind.Enum Then 666Dim ensureParameterlessConstructor As Boolean = (TypeKind = TypeKind.Structure OrElse TypeKind = TypeKind.Enum) AndAlso Not IsShared 1015result = TypeKind.Enum 1171Case TypeKind.Enum
Symbols\NamedTypeSymbol.vb (2)
444Return TypeKind <> TypeKind.Enum AndAlso TypeKind <> TypeKind.Structure AndAlso 457Return TypeKind = TypeKind.Enum OrElse TypeKind = TypeKind.Structure
Symbols\Source\SourceMemberContainerTypeSymbol.vb (3)
38[Enum] = CUShort(TypeKind.Enum) << TypeKindShift 343Case TypeKind.Class, TypeKind.Enum, TypeKind.Structure 2739TypeKind = TypeKind.Enum OrElse
Symbols\Source\SourceMemberMethodSymbol.vb (1)
756Case TypeKind.Interface, TypeKind.Structure, TypeKind.Enum, TypeKind.Delegate
Symbols\Source\SourceNamedTypeSymbol.vb (4)
268ElseIf TypeKind = TypeKind.Enum Then 1114Case TypeKind.Interface, TypeKind.Enum, TypeKind.Delegate, TypeKind.Structure, TypeKind.Module, TypeKind.Array ' array can't really occur 1387Case TypeKind.Enum 1505If TypeKind = TypeKind.Enum Then
Symbols\Symbol_Attributes.vb (1)
107Case TypeKind.Enum
Symbols\SymbolExtensions.vb (1)
37Case TypeKind.Enum
Symbols\TypeSymbolExtensions.vb (5)
118Return type.TypeKind = TypeKind.Enum 410Case TypeKind.Array, TypeKind.Delegate, TypeKind.Enum, TypeKind.Structure, TypeKind.Module 735fieldType.TypeKind = TypeKind.Enum 833TypeKind.Enum, 858TypeKind.Enum,
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (1)
49ElseIf type?.TypeKind = TypeKind.Enum Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
94If namedType.TypeKind = TypeKind.Enum Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (2)
800Return DirectCast(symbol, INamedTypeSymbol).TypeKind = TypeKind.Enum 803Return target.IsType AndAlso DirectCast(target, ITypeSymbol).TypeKind = TypeKind.Enum
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Emit\NoPiaEmbedTypes.vb (1)
1085Assert.Equal(TypeKind.Enum, test9.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Features (3)
Completion\CompletionProviders\EnumCompletionProvider.vb (1)
61If enumType.TypeKind <> TypeKind.Enum Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (1)
2042If newSymbol.ContainingType.TypeKind = TypeKind.Enum Then
NavigationBar\VisualBasicNavigationBarItemService.vb (1)
111If type.TypeKind = TypeKind.Enum Then
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (8)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (2)
740Assert.Equal(TypeKind.Enum, typeSymbol9.TypeKind) 2772Assert.Equal(TypeKind.Enum, local.Type.TypeKind)
Semantics\GetExtendedSemanticInfoTests.vb (1)
2515Assert.Equal(TypeKind.Enum, semanticInfo.Type.TypeKind)
Semantics\UseSiteErrorTests.vb (5)
599Assert.Equal(TypeKind.Enum, compilation1.GetTypeByMetadataName("B").TypeKind) 619Assert.Equal(TypeKind.Enum, compilation2.GetTypeByMetadataName("B").TypeKind) 630Assert.Equal(TypeKind.Enum, compilation3.GetTypeByMetadataName("B").TypeKind) 672Assert.Equal(TypeKind.Enum, compilation5.GetTypeByMetadataName("B").TypeKind) 713Assert.Equal(TypeKind.Enum, compilation7.GetTypeByMetadataName("B").TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (7)
SymbolsTests\Metadata\PE\TypeKindTests.vb (1)
65Assert.Equal(TypeKind.Enum, typeCode.TypeKind)
SymbolsTests\Source\EnumTests.vb (1)
908Assert.Equal(TypeKind.Enum, member.Type.TypeKind)
SymbolsTests\Source\TypeTests.vb (3)
149Assert.Equal(TypeKind.Enum, enumE.TypeKind) 277Assert.Equal(TypeKind.Enum, i4Enum.TypeKind) 554Assert.Equal(TypeKind.Enum, enumE.TypeKind)
SymbolsTests\WellKnownTypeValidationTests.vb (2)
210Assert.Equal(If(wellKnown.DeclaringCompilation Is comp, TypeKind.Enum, TypeKind.Error), wellKnown.TypeKind) 213Assert.Equal(TypeKind.Enum, lookup.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (6)
Recommendations\VisualBasicRecommendationServiceRunner.vb (1)
275If container Is Nothing OrElse TryCast(container, ITypeSymbol)?.TypeKind = TypeKind.Enum Then
Simplification\Reducers\VisualBasicEscapingReducer.vb (1)
106If type.TypeKind <> TypeKind.Interface AndAlso type.TypeKind <> TypeKind.Enum Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (1)
49ElseIf type?.TypeKind = TypeKind.Enum Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
94If namedType.TypeKind = TypeKind.Enum Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (2)
800Return DirectCast(symbol, INamedTypeSymbol).TypeKind = TypeKind.Enum 803Return target.IsType AndAlso DirectCast(target, ITypeSymbol).TypeKind = TypeKind.Enum
Microsoft.CodeAnalysis.Workspaces (11)
Classification\ClassificationExtensions.cs (1)
16TypeKind.Enum => ClassificationTypeNames.EnumName,
Editing\SyntaxGenerator.cs (2)
784TypeKind.Enum => EnumDeclaration( 850case TypeKind.Enum:
FindSymbols\FindReferences\DependentTypeFinder_ImplementingTypes.cs (1)
57TypeKind.Enum);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
635if (type != null && type.IsValueType && type.TypeKind == TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
128private static readonly SymbolKindOrTypeKind _enum = new(TypeKind.Enum); 389case TypeKind.Enum:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
71new SymbolKindOrTypeKind(TypeKind.Enum),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
36if (typeSymbol.TypeKind != TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
152if (namedType.TypeKind != TypeKind.Enum)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (1)
48public bool IsValueType => TypeKind is TypeKind.Struct or TypeKind.Enum;
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
EditorConfigParsing\NamingStyleParserTests.cs (1)
160symbolKind => Assert.Equal(new SymbolKindOrTypeKind(TypeKind.Enum), symbolKind),
Microsoft.Gen.Metrics (1)
Parser.cs (1)
726if (kind == TypeKind.Enum)
Microsoft.Gen.MetricsReports (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
726if (kind == TypeKind.Enum)
Microsoft.Interop.SourceGeneration (2)
BlittableTypeMarshallingInfoProvider.cs (1)
27if (type.TypeKind is TypeKind.Enum or TypeKind.Pointer or TypeKind.FunctionPointer
ManagedTypeInfo.cs (1)
48if (type.TypeKind == TypeKind.Enum)
Microsoft.VisualStudio.LanguageServices (6)
GenerateType\GenerateTypeDialogViewModel.cs (1)
214PopulateTypeKind(TypeKind.Enum, "enum", "Enum");
Library\ObjectBrowser\Lists\MemberListItem.cs (1)
27if (fieldSymbol.ContainingType.TypeKind == TypeKind.Enum)
Library\ObjectBrowser\ObjectList.cs (1)
206case TypeKind.Enum:
Progression\GraphBuilder.cs (2)
582case TypeKind.Enum: 642if (field.ContainingType.TypeKind == TypeKind.Enum)
Progression\GraphProvider.cs (1)
200IsAnyTypeKind(n, TypeKind.Class, TypeKind.Interface, TypeKind.Struct, TypeKind.Enum, TypeKind.Delegate)))
Microsoft.VisualStudio.LanguageServices.CSharp (7)
CodeModel\CSharpCodeModelService.cs (1)
756TypeKind.Enum or
ObjectBrowser\DescriptionBuilder.cs (5)
71case TypeKind.Enum: 97if (typeSymbol.TypeKind == TypeKind.Enum) 183typeSymbol.TypeKind != TypeKind.Enum && 259fieldSymbol.ContainingType.TypeKind == TypeKind.Enum) 478if (fieldSymbol.ContainingType.TypeKind != TypeKind.Enum)
Progression\CSharpProgressionLanguageService.cs (1)
118case IFieldSymbol f: return f.ContainingType.TypeKind == TypeKind.Enum ? null : f.Type;
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
GlyphExtensionsTests.cs (2)
80containingType: (INamedTypeSymbol)CreateSymbolMock(SymbolKind.NamedType, typeKind: TypeKind.Enum)); 123typeKind: TypeKind.Enum);
Microsoft.VisualStudio.LanguageServices.VisualBasic (8)
CodeModel\Extenders\GenericExtender.vb (3)
40TypeKind.Enum 68TypeKind.Enum 94TypeKind.Enum
CodeModel\VisualBasicCodeModelService.vb (1)
770If typeSymbol.TypeKind = TypeKind.Enum Then
ObjectBrowser\DescriptionBuilder.vb (3)
76Case TypeKind.Enum 105If typeSymbol.TypeKind = TypeKind.Enum Then 321typeSymbol.TypeKind <> TypeKind.Enum AndAlso
Progression\VisualBasicProgressionLanguageService.vb (1)
82If symbol.Kind = SymbolKind.Field AndAlso symbol.ContainingType.TypeKind = TypeKind.Enum Then
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
554else if (type.TypeKind is TypeKind.Enum)