47 references to GetEnumInfo
System.Private.CoreLib (47)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (43)
62
if (underlyingType == typeof(sbyte) || underlyingType == typeof(byte)) return GetNameInlined(
GetEnumInfo
<byte>(rt), *(byte*)&value);
63
if (underlyingType == typeof(short) || underlyingType == typeof(ushort)) return GetNameInlined(
GetEnumInfo
<ushort>(rt), *(ushort*)&value);
64
if (underlyingType == typeof(int) || underlyingType == typeof(uint)) return GetNameInlined(
GetEnumInfo
<uint>(rt), *(uint*)&value);
65
if (underlyingType == typeof(long) || underlyingType == typeof(ulong)) return GetNameInlined(
GetEnumInfo
<ulong>(rt), *(ulong*)&value);
110
return GetName(
GetEnumInfo
<byte>(enumType), (byte)(sbyte)uint64Value);
114
return GetName(
GetEnumInfo
<byte>(enumType), (byte)uint64Value);
118
return GetName(
GetEnumInfo
<ushort>(enumType), (ushort)(short)uint64Value);
122
return GetName(
GetEnumInfo
<ushort>(enumType), (ushort)uint64Value);
126
return GetName(
GetEnumInfo
<uint>(enumType), (uint)(int)uint64Value);
130
return GetName(
GetEnumInfo
<uint>(enumType), (uint)uint64Value);
133
return GetName(
GetEnumInfo
<ulong>(enumType), (ulong)(long)uint64Value);
136
return GetName(
GetEnumInfo
<ulong>(enumType), uint64Value);
227
if (underlyingType == typeof(sbyte) || underlyingType == typeof(byte)) names =
GetEnumInfo
<byte>(rt).Names;
228
else if (underlyingType == typeof(short) || underlyingType == typeof(ushort)) names =
GetEnumInfo
<ushort>(rt).Names;
229
else if (underlyingType == typeof(int) || underlyingType == typeof(uint)) names =
GetEnumInfo
<uint>(rt).Names;
230
else if (underlyingType == typeof(long) || underlyingType == typeof(ulong)) names =
GetEnumInfo
<ulong>(rt).Names;
262
CorElementType.ELEMENT_TYPE_I1 or CorElementType.ELEMENT_TYPE_U1 =>
GetEnumInfo
<byte>(enumType).Names,
263
CorElementType.ELEMENT_TYPE_I2 or CorElementType.ELEMENT_TYPE_U2 =>
GetEnumInfo
<ushort>(enumType).Names,
264
CorElementType.ELEMENT_TYPE_I4 or CorElementType.ELEMENT_TYPE_U4 =>
GetEnumInfo
<uint>(enumType).Names,
265
CorElementType.ELEMENT_TYPE_I8 or CorElementType.ELEMENT_TYPE_U8 =>
GetEnumInfo
<ulong>(enumType).Names,
345
CorElementType.ELEMENT_TYPE_I1 =>
GetEnumInfo
<byte>(enumType, getNames: false).CloneValues<sbyte>(),
346
CorElementType.ELEMENT_TYPE_U1 =>
GetEnumInfo
<byte>(enumType, getNames: false).CloneValues<byte>(),
347
CorElementType.ELEMENT_TYPE_I2 =>
GetEnumInfo
<ushort>(enumType, getNames: false).CloneValues<short>(),
348
CorElementType.ELEMENT_TYPE_U2 =>
GetEnumInfo
<ushort>(enumType, getNames: false).CloneValues<ushort>(),
349
CorElementType.ELEMENT_TYPE_I4 =>
GetEnumInfo
<uint>(enumType, getNames: false).CloneValues<int>(),
350
CorElementType.ELEMENT_TYPE_U4 =>
GetEnumInfo
<uint>(enumType, getNames: false).CloneValues<uint>(),
351
CorElementType.ELEMENT_TYPE_I8 =>
GetEnumInfo
<ulong>(enumType, getNames: false).CloneValues<long>(),
352
CorElementType.ELEMENT_TYPE_U8 =>
GetEnumInfo
<ulong>(enumType, getNames: false).CloneValues<ulong>(),
375
CorElementType.ELEMENT_TYPE_I1 =>
GetEnumInfo
<byte>(enumType, getNames: false).Values,
376
CorElementType.ELEMENT_TYPE_U1 =>
GetEnumInfo
<byte>(enumType, getNames: false).Values,
377
CorElementType.ELEMENT_TYPE_I2 =>
GetEnumInfo
<ushort>(enumType, getNames: false).Values,
378
CorElementType.ELEMENT_TYPE_U2 =>
GetEnumInfo
<ushort>(enumType, getNames: false).Values,
379
CorElementType.ELEMENT_TYPE_I4 =>
GetEnumInfo
<uint>(enumType, getNames: false).Values,
380
CorElementType.ELEMENT_TYPE_U4 =>
GetEnumInfo
<uint>(enumType, getNames: false).Values,
381
CorElementType.ELEMENT_TYPE_I8 =>
GetEnumInfo
<ulong>(enumType, getNames: false).Values,
382
CorElementType.ELEMENT_TYPE_U8 =>
GetEnumInfo
<ulong>(enumType, getNames: false).Values,
495
EnumInfo<TStorage> enumInfo =
GetEnumInfo
<TStorage>(enumType, getNames: false);
1049
EnumInfo<TStorage> enumInfo =
GetEnumInfo
<TStorage>(enumType);
1472
EnumInfo<TStorage> enumInfo =
GetEnumInfo
<TStorage>(enumType);
1506
EnumInfo<TStorage> enumInfo =
GetEnumInfo
<TStorage>(enumType);
1523
result = FormatFlagNames(
GetEnumInfo
<TStorage>(enumType), value);
1863
EnumInfo<TStorage> enumInfo =
GetEnumInfo
<TStorage>(enumType);
1915
if (TryFormatFlagNames(
GetEnumInfo
<TStorage>(enumType), Unsafe.BitCast<TUnderlying, TStorage>(value), destination, out charsWritten, ref destinationIsTooSmall) ||
System\Enum.NativeAot.cs (4)
32
EETypeElementType.SByte or EETypeElementType.Byte =>
GetEnumInfo
<byte>(enumType),
33
EETypeElementType.Int16 or EETypeElementType.UInt16 =>
GetEnumInfo
<ushort>(enumType),
34
EETypeElementType.Int32 or EETypeElementType.UInt32 =>
GetEnumInfo
<uint>(enumType),
35
EETypeElementType.Int64 or EETypeElementType.UInt64 =>
GetEnumInfo
<ulong>(enumType),