5 implementations of EnumUnderlyingType
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
82public abstract INamedTypeSymbol EnumUnderlyingType { get; }
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\NamedTypeSymbol.cs (1)
115INamedTypeSymbol INamedTypeSymbol.EnumUnderlyingType
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
73public INamedTypeSymbol EnumUnderlyingType => _symbol.EnumUnderlyingType;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamedTypeSymbol.vb (1)
1333Private ReadOnly Property INamedTypeSymbol_EnumUnderlyingType As INamedTypeSymbol Implements INamedTypeSymbol.EnumUnderlyingType
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
82public abstract INamedTypeSymbol EnumUnderlyingType { get; }
71 references to EnumUnderlyingType
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
887private static bool IsEnum(ITypeSymbol type) => type is INamedTypeSymbol { EnumUnderlyingType: INamedTypeSymbol { } };
Microsoft.Analyzers.Local (5)
ApiLifecycle\AssemblyAnalysis.cs (5)
144if (type.EnumUnderlyingType != null) 148if (type.EnumUnderlyingType.SpecialType != SpecialType.System_Int32) 150_ = baseTypes.Add(type.EnumUnderlyingType.ToDisplayString(_format)); 252if (t?.EnumUnderlyingType != null) 275if (type.EnumUnderlyingType != null)
Microsoft.CodeAnalysis (10)
Compilation\Expression.cs (1)
43return SynthesizeNumeric(((INamedTypeSymbol)type).EnumUnderlyingType!, value);
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (8)
154Debug.Assert(enumType.EnumUnderlyingType is not null); 165AddLiteralValue(enumType.EnumUnderlyingType.SpecialType, constantValue); 236Debug.Assert(enumType.EnumUnderlyingType is not null); 237var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 315Debug.Assert(enumType.EnumUnderlyingType is not null); 316var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 335Debug.Assert(enumType.EnumUnderlyingType is not null); 336var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
Symbols\ITypeSymbol.cs (1)
246return (type as INamedTypeSymbol)?.EnumUnderlyingType;
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
492type1.EnumUnderlyingType?.SpecialType == type2.SpecialType;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
34return CreateOne(enumType.EnumUnderlyingType.SpecialType);
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (6)
80Contract.ThrowIfNull(enumType.EnumUnderlyingType); 81var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 174Contract.ThrowIfNull(enumType.EnumUnderlyingType); 175var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 190Contract.ThrowIfNull(enumType.EnumUnderlyingType); 191var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
34namedType.EnumUnderlyingType);
Microsoft.CodeAnalysis.CSharp (1)
Symbols\TypedConstantExtensions.cs (1)
52SpecialType splType = ((INamedTypeSymbol)constant.Type!).EnumUnderlyingType!.SpecialType;
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
123if (Equals(enumType?.EnumUnderlyingType, castedType)) 158if (Equals(enumType?.EnumUnderlyingType, castedType))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpFlagsEnumGenerator.cs (1)
26generator, enumType.EnumUnderlyingType, constantValue, canUseFieldReference: true);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (1)
161var underlyingType = namedType?.EnumUnderlyingType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (3)
248var baseList = namedType.EnumUnderlyingType != null && namedType.EnumUnderlyingType.SpecialType != SpecialType.System_Int32 249? BaseList([SimpleBaseType(namedType.EnumUnderlyingType.GenerateTypeSyntax())])
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\EnumTests.cs (1)
985var type = symbol.EnumUnderlyingType;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Extensions.cs (2)
835return type.TypeKind == TypeKind.Enum ? ((INamedTypeSymbol)type).EnumUnderlyingType : type; 841return ((object)namedType != null) ? namedType.EnumUnderlyingType : null;
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
123if (Equals(enumType?.EnumUnderlyingType, castedType)) 158if (Equals(enumType?.EnumUnderlyingType, castedType))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpFlagsEnumGenerator.cs (1)
26generator, enumType.EnumUnderlyingType, constantValue, canUseFieldReference: true);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (1)
161var underlyingType = namedType?.EnumUnderlyingType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (3)
248var baseList = namedType.EnumUnderlyingType != null && namedType.EnumUnderlyingType.SpecialType != SpecialType.System_Int32 249? BaseList([SimpleBaseType(namedType.EnumUnderlyingType.GenerateTypeSyntax())])
Microsoft.CodeAnalysis.Features (3)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (2)
473if (symbol.IsEnumType() && symbol.EnumUnderlyingType!.SpecialType != SpecialType.System_Int32) 476var underlyingTypeDisplayParts = symbol.EnumUnderlyingType.ToDisplayParts(s_descriptionStyle.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes));
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
73public INamedTypeSymbol EnumUnderlyingType => _symbol.EnumUnderlyingType;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\NamedTypeSymbol.vb (1)
1333Private ReadOnly Property INamedTypeSymbol_EnumUnderlyingType As INamedTypeSymbol Implements INamedTypeSymbol.EnumUnderlyingType
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EnumMemberGenerator.vb (1)
137Dim underlyingType = If(namedType IsNot Nothing, namedType.EnumUnderlyingType, Nothing)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (3)
149If(namedType.EnumUnderlyingType IsNot Nothing AndAlso namedType.EnumUnderlyingType.SpecialType <> SpecialType.System_Int32, 150SyntaxFactory.SimpleAsClause(namedType.EnumUnderlyingType.GenerateTypeSyntax()),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicFlagsEnumGenerator.vb (1)
23enumType.EnumUnderlyingType, constantValue, canUseFieldReference:=True)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EnumMemberGenerator.vb (1)
137Dim underlyingType = If(namedType IsNot Nothing, namedType.EnumUnderlyingType, Nothing)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (3)
149If(namedType.EnumUnderlyingType IsNot Nothing AndAlso namedType.EnumUnderlyingType.SpecialType <> SpecialType.System_Int32, 150SyntaxFactory.SimpleAsClause(namedType.EnumUnderlyingType.GenerateTypeSyntax()),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicFlagsEnumGenerator.vb (1)
23enumType.EnumUnderlyingType, constantValue, canUseFieldReference:=True)
Microsoft.CodeAnalysis.Workspaces (11)
Editing\SyntaxGenerator.cs (2)
786underlyingType: type.EnumUnderlyingType is null or { SpecialType: SpecialType.System_Int32 } 788: TypeExpression(type.EnumUnderlyingType.SpecialType),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
492type1.EnumUnderlyingType?.SpecialType == type2.SpecialType;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
34return CreateOne(enumType.EnumUnderlyingType.SpecialType);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (6)
80Contract.ThrowIfNull(enumType.EnumUnderlyingType); 81var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 174Contract.ThrowIfNull(enumType.EnumUnderlyingType); 175var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 190Contract.ThrowIfNull(enumType.EnumUnderlyingType); 191var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
34namedType.EnumUnderlyingType);
Microsoft.Interop.SourceGeneration (1)
ManagedTypeInfo.cs (1)
50return new EnumTypeInfo(typeName, diagnosticFormattedName, ((INamedTypeSymbol)type).EnumUnderlyingType!.SpecialType);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ObjectBrowser\DescriptionBuilder.cs (1)
99var underlyingType = typeSymbol.EnumUnderlyingType;
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
ObjectBrowser\DescriptionBuilder.vb (1)
106Dim underlyingType = typeSymbol.EnumUnderlyingType