2 overrides of GetEnumUnderlyingType
mscorlib (2)
system\reflection\emit\enumbuilder.cs (1)
291
public override Type
GetEnumUnderlyingType
()
system\rttype.cs (1)
4097
public override Type
GetEnumUnderlyingType
()
25 references to GetEnumUnderlyingType
mscorlib (4)
system\enum.cs (1)
491
return enumType.
GetEnumUnderlyingType
();
system\type.cs (3)
1499
valueType = valueType.
GetEnumUnderlyingType
();
1515
Type underlyingType =
GetEnumUnderlyingType
();
1527
throw new ArgumentException(Environment.GetResourceString("Arg_EnumUnderlyingTypeAndObjectMustBeSameType", valueType.ToString(),
GetEnumUnderlyingType
()));
System (2)
compmod\system\componentmodel\ReflectPropertyDescriptor.cs (2)
187
if (defaultValue != null && PropertyType.IsEnum && PropertyType.
GetEnumUnderlyingType
() == defaultValue.GetType()) {
323
if (defaultValue != null && PropertyType.IsEnum && PropertyType.
GetEnumUnderlyingType
() == defaultValue.GetType()) {
System.Data.Entity (19)
System\Data\Common\CommandTrees\ExpressionBuilder\Internal\ArgumentValidation.cs (3)
2097
if(!TryGetPrimitiveTypeKind(clrEnumType.
GetEnumUnderlyingType
(), out clrEnumUnderlyingTypeKind)
2107
edmEnumTypeMember.Value.GetType() == clrEnumType.
GetEnumUnderlyingType
(),
2112
Convert.ChangeType(Enum.Parse(clrEnumType, edmEnumTypeMember.Name), clrEnumType.
GetEnumUnderlyingType
(), CultureInfo.InvariantCulture)))
System\Data\Common\CommandTrees\ValueExpressions.cs (1)
34
Debug.Assert(Helper.AsPrimitive(resultType.EdmType).ClrEquivalentType == (value.GetType().IsEnum ? value.GetType().
GetEnumUnderlyingType
() : value.GetType()),
System\Data\Mapping\Update\Internal\UpdateCompiler.cs (1)
471
principalValue = Convert.ChangeType(principalValue, principalType.
GetEnumUnderlyingType
(), CultureInfo.InvariantCulture);
System\Data\Metadata\Edm\EnumType.cs (2)
92
ClrProviderManifest.Instance.TryGetPrimitiveType(clrType.
GetEnumUnderlyingType
(), out _underlyingType);
105
Convert.ChangeType(Enum.Parse(clrType, name), clrType.
GetEnumUnderlyingType
(), CultureInfo.InvariantCulture)));
System\Data\Metadata\ObjectLayer\ObjectItemAttributeAssemblyLoader.cs (2)
319
if (!ClrProviderManifest.Instance.TryGetPrimitiveType(clrType.
GetEnumUnderlyingType
(), out underlyingEnumType))
323
Strings.Validator_UnsupportedEnumUnderlyingType(clrType.
GetEnumUnderlyingType
().FullName),
System\Data\Metadata\ObjectLayer\ObjectItemConventionAssemblyLoader.cs (4)
255
if (!ClrProviderManifest.Instance.TryGetPrimitiveType(enumType.
GetEnumUnderlyingType
(), out underlyingEnumType))
258
Strings.Validator_UnsupportedEnumUnderlyingType(enumType.
GetEnumUnderlyingType
().FullName),
286
Debug.Assert(cspaceEnumType.UnderlyingType.ClrEquivalentType == enumType.
GetEnumUnderlyingType
(), "underlying types should have already been checked");
288
var enumUnderlyingType = enumType.
GetEnumUnderlyingType
();
System\Data\Objects\ELinq\ExpressionConverter.cs (2)
1023
nonNullableType = nonNullableType.
GetEnumUnderlyingType
();
1056
if(nonNullableType.IsEnum && ClrProviderManifest.Instance.TryGetPrimitiveTypeKind(nonNullableType.
GetEnumUnderlyingType
(), out primitiveTypeKind))
System\Data\Objects\ELinq\Translator.cs (1)
146
value = System.Convert.ChangeType(linq.Value, nonNullableLinqType.
GetEnumUnderlyingType
(), CultureInfo.InvariantCulture);
System\Data\Objects\ObjectContext.cs (1)
3172
(unwrappedTElement.IsEnum && MetadataHelper.TryDetermineCSpaceModelType(unwrappedTElement.
GetEnumUnderlyingType
(), this.MetadataWorkspace, out modelEdmType)))
System\Data\Query\InternalTrees\ColumnMapFactory.cs (1)
149
Type propType = propertyUnderlyingType.IsEnum ? propertyUnderlyingType.
GetEnumUnderlyingType
() : prop.PropertyType;
System\Data\Query\PlanCompiler\NominalTypeEliminator.cs (1)
1886
Convert.ChangeType(op.Value, op.Value.GetType().
GetEnumUnderlyingType
(), CultureInfo.InvariantCulture) :