520 references to CorElementType
System.Private.CoreLib (520)
src\libraries\System.Private.CoreLib\src\System\Array.cs (91)
892
CorElementType
et = array.GetCorElementTypeOfElementType();
904
case
CorElementType
.ELEMENT_TYPE_I1:
907
case
CorElementType
.ELEMENT_TYPE_U1:
908
case
CorElementType
.ELEMENT_TYPE_BOOLEAN:
911
case
CorElementType
.ELEMENT_TYPE_I2:
914
case
CorElementType
.ELEMENT_TYPE_U2:
915
case
CorElementType
.ELEMENT_TYPE_CHAR:
918
case
CorElementType
.ELEMENT_TYPE_I4:
921
case
CorElementType
.ELEMENT_TYPE_U4:
924
case
CorElementType
.ELEMENT_TYPE_I8:
927
case
CorElementType
.ELEMENT_TYPE_U8:
930
case
CorElementType
.ELEMENT_TYPE_I:
932
goto case
CorElementType
.ELEMENT_TYPE_I4;
933
goto case
CorElementType
.ELEMENT_TYPE_I8;
934
case
CorElementType
.ELEMENT_TYPE_U:
936
goto case
CorElementType
.ELEMENT_TYPE_U4;
937
goto case
CorElementType
.ELEMENT_TYPE_U8;
938
case
CorElementType
.ELEMENT_TYPE_R4:
941
case
CorElementType
.ELEMENT_TYPE_R8:
1399
CorElementType
et = array.GetCorElementTypeOfElementType();
1411
case
CorElementType
.ELEMENT_TYPE_I1:
1412
case
CorElementType
.ELEMENT_TYPE_U1:
1413
case
CorElementType
.ELEMENT_TYPE_BOOLEAN:
1416
case
CorElementType
.ELEMENT_TYPE_I2:
1417
case
CorElementType
.ELEMENT_TYPE_U2:
1418
case
CorElementType
.ELEMENT_TYPE_CHAR:
1421
case
CorElementType
.ELEMENT_TYPE_I4:
1422
case
CorElementType
.ELEMENT_TYPE_U4:
1425
case
CorElementType
.ELEMENT_TYPE_I8:
1426
case
CorElementType
.ELEMENT_TYPE_U8:
1429
case
CorElementType
.ELEMENT_TYPE_I:
1430
case
CorElementType
.ELEMENT_TYPE_U:
1432
goto case
CorElementType
.ELEMENT_TYPE_I4;
1433
goto case
CorElementType
.ELEMENT_TYPE_I8;
1434
case
CorElementType
.ELEMENT_TYPE_R4:
1437
case
CorElementType
.ELEMENT_TYPE_R8:
1626
CorElementType
et = array.GetCorElementTypeOfElementType();
1638
case
CorElementType
.ELEMENT_TYPE_I1:
1639
case
CorElementType
.ELEMENT_TYPE_U1:
1640
case
CorElementType
.ELEMENT_TYPE_BOOLEAN:
1643
case
CorElementType
.ELEMENT_TYPE_I2:
1644
case
CorElementType
.ELEMENT_TYPE_U2:
1645
case
CorElementType
.ELEMENT_TYPE_CHAR:
1648
case
CorElementType
.ELEMENT_TYPE_I4:
1649
case
CorElementType
.ELEMENT_TYPE_U4:
1652
case
CorElementType
.ELEMENT_TYPE_I8:
1653
case
CorElementType
.ELEMENT_TYPE_U8:
1656
case
CorElementType
.ELEMENT_TYPE_I:
1657
case
CorElementType
.ELEMENT_TYPE_U:
1659
goto case
CorElementType
.ELEMENT_TYPE_I4;
1660
goto case
CorElementType
.ELEMENT_TYPE_I8;
1661
case
CorElementType
.ELEMENT_TYPE_R4:
1664
case
CorElementType
.ELEMENT_TYPE_R8:
1844
case
CorElementType
.ELEMENT_TYPE_I1:
1845
case
CorElementType
.ELEMENT_TYPE_U1:
1846
case
CorElementType
.ELEMENT_TYPE_BOOLEAN:
1849
case
CorElementType
.ELEMENT_TYPE_I2:
1850
case
CorElementType
.ELEMENT_TYPE_U2:
1851
case
CorElementType
.ELEMENT_TYPE_CHAR:
1854
case
CorElementType
.ELEMENT_TYPE_I4:
1855
case
CorElementType
.ELEMENT_TYPE_U4:
1856
case
CorElementType
.ELEMENT_TYPE_R4:
1859
case
CorElementType
.ELEMENT_TYPE_I8:
1860
case
CorElementType
.ELEMENT_TYPE_U8:
1861
case
CorElementType
.ELEMENT_TYPE_R8:
1864
case
CorElementType
.ELEMENT_TYPE_I:
1865
case
CorElementType
.ELEMENT_TYPE_U:
1867
goto case
CorElementType
.ELEMENT_TYPE_I4;
1868
goto case
CorElementType
.ELEMENT_TYPE_I8;
1869
case
CorElementType
.ELEMENT_TYPE_OBJECT:
1870
case
CorElementType
.ELEMENT_TYPE_ARRAY:
1871
case
CorElementType
.ELEMENT_TYPE_SZARRAY:
2038
CorElementType
et = keys.GetCorElementTypeOfElementType();
2044
case
CorElementType
.ELEMENT_TYPE_I1:
2047
case
CorElementType
.ELEMENT_TYPE_U1:
2048
case
CorElementType
.ELEMENT_TYPE_BOOLEAN:
2051
case
CorElementType
.ELEMENT_TYPE_I2:
2054
case
CorElementType
.ELEMENT_TYPE_U2:
2055
case
CorElementType
.ELEMENT_TYPE_CHAR:
2058
case
CorElementType
.ELEMENT_TYPE_I4:
2061
case
CorElementType
.ELEMENT_TYPE_U4:
2064
case
CorElementType
.ELEMENT_TYPE_I8:
2067
case
CorElementType
.ELEMENT_TYPE_U8:
2070
case
CorElementType
.ELEMENT_TYPE_I:
2072
goto case
CorElementType
.ELEMENT_TYPE_I4;
2073
goto case
CorElementType
.ELEMENT_TYPE_I8;
2074
case
CorElementType
.ELEMENT_TYPE_U:
2076
goto case
CorElementType
.ELEMENT_TYPE_U4;
2077
goto case
CorElementType
.ELEMENT_TYPE_U8;
2078
case
CorElementType
.ELEMENT_TYPE_R4:
2081
case
CorElementType
.ELEMENT_TYPE_R8:
src\libraries\System.Private.CoreLib\src\System\Enum.cs (211)
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,
267
CorElementType
.ELEMENT_TYPE_I or
CorElementType
.ELEMENT_TYPE_U => GetEnumInfo<nuint>(enumType).Names,
268
CorElementType
.ELEMENT_TYPE_R4 => GetEnumInfo<float>(enumType).Names,
269
CorElementType
.ELEMENT_TYPE_R8 => GetEnumInfo<double>(enumType).Names,
270
CorElementType
.ELEMENT_TYPE_CHAR => GetEnumInfo<char>(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>(),
354
CorElementType
.ELEMENT_TYPE_I => GetEnumInfo<nuint>(enumType, getNames: false).CloneValues<nint>(),
355
CorElementType
.ELEMENT_TYPE_U => GetEnumInfo<nuint>(enumType, getNames: false).CloneValues<nuint>(),
356
CorElementType
.ELEMENT_TYPE_R4 => GetEnumInfo<float>(enumType, getNames: false).CloneValues<float>(),
357
CorElementType
.ELEMENT_TYPE_R8 => GetEnumInfo<double>(enumType, getNames: false).CloneValues<double>(),
358
CorElementType
.ELEMENT_TYPE_CHAR => GetEnumInfo<char>(enumType, getNames: false).CloneValues<char>(),
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,
384
CorElementType
.ELEMENT_TYPE_I => GetEnumInfo<nuint>(enumType, getNames: false).Values,
385
CorElementType
.ELEMENT_TYPE_U => GetEnumInfo<nuint>(enumType, getNames: false).Values,
386
CorElementType
.ELEMENT_TYPE_R4 => GetEnumInfo<float>(enumType, getNames: false).Values,
387
CorElementType
.ELEMENT_TYPE_R8 => GetEnumInfo<double>(enumType, getNames: false).Values,
388
CorElementType
.ELEMENT_TYPE_CHAR => GetEnumInfo<char>(enumType, getNames: false).Values,
411
case
CorElementType
.ELEMENT_TYPE_I1:
412
case
CorElementType
.ELEMENT_TYPE_U1:
418
case
CorElementType
.ELEMENT_TYPE_I2:
419
case
CorElementType
.ELEMENT_TYPE_U2:
425
case
CorElementType
.ELEMENT_TYPE_I4:
426
case
CorElementType
.ELEMENT_TYPE_U4:
432
case
CorElementType
.ELEMENT_TYPE_I8:
433
case
CorElementType
.ELEMENT_TYPE_U8:
440
case
CorElementType
.ELEMENT_TYPE_BOOLEAN:
441
goto case
CorElementType
.ELEMENT_TYPE_U1;
443
case
CorElementType
.ELEMENT_TYPE_CHAR:
444
goto case
CorElementType
.ELEMENT_TYPE_U2;
446
case
CorElementType
.ELEMENT_TYPE_R4:
447
goto case
CorElementType
.ELEMENT_TYPE_U4;
449
case
CorElementType
.ELEMENT_TYPE_R8:
450
goto case
CorElementType
.ELEMENT_TYPE_U8;
452
case
CorElementType
.ELEMENT_TYPE_I:
453
case
CorElementType
.ELEMENT_TYPE_U:
457
goto case
CorElementType
.ELEMENT_TYPE_U8;
727
case
CorElementType
.ELEMENT_TYPE_I1:
732
case
CorElementType
.ELEMENT_TYPE_U1:
737
case
CorElementType
.ELEMENT_TYPE_I2:
742
case
CorElementType
.ELEMENT_TYPE_U2:
747
case
CorElementType
.ELEMENT_TYPE_I4:
752
case
CorElementType
.ELEMENT_TYPE_U4:
757
case
CorElementType
.ELEMENT_TYPE_I8:
761
case
CorElementType
.ELEMENT_TYPE_U8:
781
case
CorElementType
.ELEMENT_TYPE_R4:
788
case
CorElementType
.ELEMENT_TYPE_R8:
795
case
CorElementType
.ELEMENT_TYPE_I:
802
case
CorElementType
.ELEMENT_TYPE_U:
809
case
CorElementType
.ELEMENT_TYPE_CHAR:
1169
CorElementType
.ELEMENT_TYPE_I1 => Unsafe.As<byte, sbyte>(ref data),
1170
CorElementType
.ELEMENT_TYPE_U1 => data,
1171
CorElementType
.ELEMENT_TYPE_I2 => Unsafe.As<byte, short>(ref data),
1172
CorElementType
.ELEMENT_TYPE_U2 => Unsafe.As<byte, ushort>(ref data),
1173
CorElementType
.ELEMENT_TYPE_I4 => Unsafe.As<byte, int>(ref data),
1174
CorElementType
.ELEMENT_TYPE_U4 => Unsafe.As<byte, uint>(ref data),
1175
CorElementType
.ELEMENT_TYPE_I8 => Unsafe.As<byte, long>(ref data),
1176
CorElementType
.ELEMENT_TYPE_U8 => Unsafe.As<byte, ulong>(ref data),
1178
CorElementType
.ELEMENT_TYPE_R4 => Unsafe.As<byte, float>(ref data),
1179
CorElementType
.ELEMENT_TYPE_R8 => Unsafe.As<byte, double>(ref data),
1180
CorElementType
.ELEMENT_TYPE_I => Unsafe.As<byte, IntPtr>(ref data),
1181
CorElementType
.ELEMENT_TYPE_U => Unsafe.As<byte, UIntPtr>(ref data),
1182
CorElementType
.ELEMENT_TYPE_CHAR => Unsafe.As<byte, char>(ref data),
1183
CorElementType
.ELEMENT_TYPE_BOOLEAN => Unsafe.As<byte, bool>(ref data),
1206
case
CorElementType
.ELEMENT_TYPE_I1:
1207
case
CorElementType
.ELEMENT_TYPE_U1:
1210
case
CorElementType
.ELEMENT_TYPE_I2:
1211
case
CorElementType
.ELEMENT_TYPE_U2:
1214
case
CorElementType
.ELEMENT_TYPE_I4:
1215
case
CorElementType
.ELEMENT_TYPE_U4:
1218
case
CorElementType
.ELEMENT_TYPE_I8:
1219
case
CorElementType
.ELEMENT_TYPE_U8:
1223
case
CorElementType
.ELEMENT_TYPE_BOOLEAN:
1224
goto case
CorElementType
.ELEMENT_TYPE_U1;
1226
case
CorElementType
.ELEMENT_TYPE_CHAR:
1227
goto case
CorElementType
.ELEMENT_TYPE_U2;
1229
case
CorElementType
.ELEMENT_TYPE_R4:
1230
goto case
CorElementType
.ELEMENT_TYPE_U4;
1232
case
CorElementType
.ELEMENT_TYPE_R8:
1233
goto case
CorElementType
.ELEMENT_TYPE_U8;
1235
case
CorElementType
.ELEMENT_TYPE_I:
1236
case
CorElementType
.ELEMENT_TYPE_U:
1240
goto case
CorElementType
.ELEMENT_TYPE_U8;
1259
CorElementType
.ELEMENT_TYPE_I1 => Unsafe.As<byte, sbyte>(ref data).GetHashCode(),
1260
CorElementType
.ELEMENT_TYPE_U1 => data.GetHashCode(),
1261
CorElementType
.ELEMENT_TYPE_I2 => Unsafe.As<byte, short>(ref data).GetHashCode(),
1262
CorElementType
.ELEMENT_TYPE_U2 => Unsafe.As<byte, ushort>(ref data).GetHashCode(),
1263
CorElementType
.ELEMENT_TYPE_I4 => Unsafe.As<byte, int>(ref data).GetHashCode(),
1264
CorElementType
.ELEMENT_TYPE_U4 => Unsafe.As<byte, uint>(ref data).GetHashCode(),
1265
CorElementType
.ELEMENT_TYPE_I8 => Unsafe.As<byte, long>(ref data).GetHashCode(),
1266
CorElementType
.ELEMENT_TYPE_U8 => Unsafe.As<byte, ulong>(ref data).GetHashCode(),
1268
CorElementType
.ELEMENT_TYPE_R4 => Unsafe.As<byte, float>(ref data).GetHashCode(),
1269
CorElementType
.ELEMENT_TYPE_R8 => Unsafe.As<byte, double>(ref data).GetHashCode(),
1270
CorElementType
.ELEMENT_TYPE_I => Unsafe.As<byte, IntPtr>(ref data).GetHashCode(),
1271
CorElementType
.ELEMENT_TYPE_U => Unsafe.As<byte, UIntPtr>(ref data).GetHashCode(),
1272
CorElementType
.ELEMENT_TYPE_CHAR => Unsafe.As<byte, char>(ref data).GetHashCode(),
1273
CorElementType
.ELEMENT_TYPE_BOOLEAN => Unsafe.As<byte, bool>(ref data).GetHashCode(),
1296
case
CorElementType
.ELEMENT_TYPE_I1:
1299
case
CorElementType
.ELEMENT_TYPE_U1:
1302
case
CorElementType
.ELEMENT_TYPE_I2:
1305
case
CorElementType
.ELEMENT_TYPE_U2:
1308
case
CorElementType
.ELEMENT_TYPE_I4:
1311
case
CorElementType
.ELEMENT_TYPE_U4:
1314
case
CorElementType
.ELEMENT_TYPE_I8:
1317
case
CorElementType
.ELEMENT_TYPE_U8:
1321
case
CorElementType
.ELEMENT_TYPE_R4:
1324
case
CorElementType
.ELEMENT_TYPE_R8:
1327
case
CorElementType
.ELEMENT_TYPE_BOOLEAN:
1328
goto case
CorElementType
.ELEMENT_TYPE_U1;
1330
case
CorElementType
.ELEMENT_TYPE_CHAR:
1331
goto case
CorElementType
.ELEMENT_TYPE_U2;
1339
case
CorElementType
.ELEMENT_TYPE_I:
1340
goto case
CorElementType
.ELEMENT_TYPE_I8;
1341
case
CorElementType
.ELEMENT_TYPE_U:
1342
goto case
CorElementType
.ELEMENT_TYPE_U8;
1361
CorElementType
.ELEMENT_TYPE_I1 => ToString<sbyte, byte>(enumType, ref rawData),
1362
CorElementType
.ELEMENT_TYPE_U1 => ToStringInlined<byte, byte>(enumType, ref rawData),
1363
CorElementType
.ELEMENT_TYPE_I2 => ToString<short, ushort>(enumType, ref rawData),
1364
CorElementType
.ELEMENT_TYPE_U2 => ToString<ushort, ushort>(enumType, ref rawData),
1365
CorElementType
.ELEMENT_TYPE_I4 => ToStringInlined<int, uint>(enumType, ref rawData),
1366
CorElementType
.ELEMENT_TYPE_U4 => ToString<uint, uint>(enumType, ref rawData),
1367
CorElementType
.ELEMENT_TYPE_I8 => ToString<long, ulong>(enumType, ref rawData),
1368
CorElementType
.ELEMENT_TYPE_U8 => ToString<ulong, ulong>(enumType, ref rawData),
1377
CorElementType
.ELEMENT_TYPE_R4 => ToString<float, float>(enumType, ref rawData),
1378
CorElementType
.ELEMENT_TYPE_R8 => ToString<double, double>(enumType, ref rawData),
1379
CorElementType
.ELEMENT_TYPE_I => ToString<nint, nuint>(enumType, ref rawData),
1380
CorElementType
.ELEMENT_TYPE_U => ToString<nuint, nuint>(enumType, ref rawData),
1381
CorElementType
.ELEMENT_TYPE_CHAR => ToString<char, char>(enumType, ref rawData),
1409
CorElementType
.ELEMENT_TYPE_I1 => ToString<sbyte, byte>(enumType, formatChar, ref rawData),
1410
CorElementType
.ELEMENT_TYPE_U1 => ToStringInlined<byte, byte>(enumType, formatChar, ref rawData),
1411
CorElementType
.ELEMENT_TYPE_I2 => ToString<short, ushort>(enumType, formatChar, ref rawData),
1412
CorElementType
.ELEMENT_TYPE_U2 => ToString<ushort, ushort>(enumType, formatChar, ref rawData),
1413
CorElementType
.ELEMENT_TYPE_I4 => ToStringInlined<int, uint>(enumType, formatChar, ref rawData),
1414
CorElementType
.ELEMENT_TYPE_U4 => ToString<uint, uint>(enumType, formatChar, ref rawData),
1415
CorElementType
.ELEMENT_TYPE_I8 => ToString<long, ulong>(enumType, formatChar, ref rawData),
1416
CorElementType
.ELEMENT_TYPE_U8 => ToString<ulong, ulong>(enumType, formatChar, ref rawData),
1428
CorElementType
.ELEMENT_TYPE_R4 => ToString<float, float>(enumType, formatChar, ref rawData),
1429
CorElementType
.ELEMENT_TYPE_R8 => ToString<double, double>(enumType, formatChar, ref rawData),
1430
CorElementType
.ELEMENT_TYPE_I => ToString<nint, nuint>(enumType, formatChar, ref rawData),
1431
CorElementType
.ELEMENT_TYPE_U => ToString<nuint, nuint>(enumType, formatChar, ref rawData),
1432
CorElementType
.ELEMENT_TYPE_CHAR => ToString<char, char>(enumType, formatChar, ref rawData),
1658
CorElementType
.ELEMENT_TYPE_I1 => ToString<sbyte, byte>(rtType, formatChar, ref rawData),
1659
CorElementType
.ELEMENT_TYPE_U1 => ToString<byte, byte>(rtType, formatChar, ref rawData),
1660
CorElementType
.ELEMENT_TYPE_I2 => ToString<short, ushort>(rtType, formatChar, ref rawData),
1661
CorElementType
.ELEMENT_TYPE_U2 => ToString<ushort, ushort>(rtType, formatChar, ref rawData),
1662
CorElementType
.ELEMENT_TYPE_I4 => ToString<int, uint>(rtType, formatChar, ref rawData),
1663
CorElementType
.ELEMENT_TYPE_U4 => ToString<uint, uint>(rtType, formatChar, ref rawData),
1664
CorElementType
.ELEMENT_TYPE_I8 => ToString<long, ulong>(rtType, formatChar, ref rawData),
1665
CorElementType
.ELEMENT_TYPE_U8 => ToString<ulong, ulong>(rtType, formatChar, ref rawData),
1667
CorElementType
.ELEMENT_TYPE_R4 => ToString<float, float>(rtType, formatChar, ref rawData),
1668
CorElementType
.ELEMENT_TYPE_R8 => ToString<double, double>(rtType, formatChar, ref rawData),
1669
CorElementType
.ELEMENT_TYPE_I => ToString<nint, nuint>(rtType, formatChar, ref rawData),
1670
CorElementType
.ELEMENT_TYPE_U => ToString<nuint, nuint>(rtType, formatChar, ref rawData),
1671
CorElementType
.ELEMENT_TYPE_CHAR => ToString<char, char>(rtType, formatChar, ref rawData),
1691
CorElementType
corElementType = InternalGetCorElementType();
1697
CorElementType
.ELEMENT_TYPE_I1 => TryFormatPrimitiveDefault<sbyte, byte>(enumType, (sbyte)rawData, destination, out charsWritten),
1698
CorElementType
.ELEMENT_TYPE_U1 => TryFormatPrimitiveDefault<byte, byte>(enumType, rawData, destination, out charsWritten),
1699
CorElementType
.ELEMENT_TYPE_I2 => TryFormatPrimitiveDefault<short, ushort>(enumType, Unsafe.As<byte, short>(ref rawData), destination, out charsWritten),
1700
CorElementType
.ELEMENT_TYPE_U2 => TryFormatPrimitiveDefault<ushort, ushort>(enumType, Unsafe.As<byte, ushort>(ref rawData), destination, out charsWritten),
1701
CorElementType
.ELEMENT_TYPE_I4 => TryFormatPrimitiveDefault<int, uint>(enumType, Unsafe.As<byte, int>(ref rawData), destination, out charsWritten),
1702
CorElementType
.ELEMENT_TYPE_U4 => TryFormatPrimitiveDefault<uint, uint>(enumType, Unsafe.As<byte, uint>(ref rawData), destination, out charsWritten),
1703
CorElementType
.ELEMENT_TYPE_I8 => TryFormatPrimitiveDefault<long, ulong>(enumType, Unsafe.As<byte, long>(ref rawData), destination, out charsWritten),
1704
CorElementType
.ELEMENT_TYPE_U8 => TryFormatPrimitiveDefault<ulong, ulong>(enumType, Unsafe.As<byte, ulong>(ref rawData), destination, out charsWritten),
1706
CorElementType
.ELEMENT_TYPE_R4 => TryFormatPrimitiveDefault<float, float>(enumType, Unsafe.As<byte, float>(ref rawData), destination, out charsWritten),
1707
CorElementType
.ELEMENT_TYPE_R8 => TryFormatPrimitiveDefault<double, double>(enumType, Unsafe.As<byte, double>(ref rawData), destination, out charsWritten),
1708
CorElementType
.ELEMENT_TYPE_I => TryFormatPrimitiveDefault<nint, nuint>(enumType, Unsafe.As<byte, nint>(ref rawData), destination, out charsWritten),
1709
CorElementType
.ELEMENT_TYPE_U => TryFormatPrimitiveDefault<nuint, nuint>(enumType, Unsafe.As<byte, nuint>(ref rawData), destination, out charsWritten),
1710
CorElementType
.ELEMENT_TYPE_CHAR => TryFormatPrimitiveDefault<char, char>(enumType, Unsafe.As<byte, char>(ref rawData), destination, out charsWritten),
1719
CorElementType
.ELEMENT_TYPE_I1 => TryFormatPrimitiveNonDefault<sbyte, byte>(enumType, (sbyte)rawData, destination, out charsWritten, format),
1720
CorElementType
.ELEMENT_TYPE_U1 => TryFormatPrimitiveNonDefault<byte, byte>(enumType, rawData, destination, out charsWritten, format),
1721
CorElementType
.ELEMENT_TYPE_I2 => TryFormatPrimitiveNonDefault<short, ushort>(enumType, Unsafe.As<byte, short>(ref rawData), destination, out charsWritten, format),
1722
CorElementType
.ELEMENT_TYPE_U2 => TryFormatPrimitiveNonDefault<ushort, ushort>(enumType, Unsafe.As<byte, ushort>(ref rawData), destination, out charsWritten, format),
1723
CorElementType
.ELEMENT_TYPE_I4 => TryFormatPrimitiveNonDefault<int, uint>(enumType, Unsafe.As<byte, int>(ref rawData), destination, out charsWritten, format),
1724
CorElementType
.ELEMENT_TYPE_U4 => TryFormatPrimitiveNonDefault<uint, uint>(enumType, Unsafe.As<byte, uint>(ref rawData), destination, out charsWritten, format),
1725
CorElementType
.ELEMENT_TYPE_I8 => TryFormatPrimitiveNonDefault<long, ulong>(enumType, Unsafe.As<byte, long>(ref rawData), destination, out charsWritten, format),
1726
CorElementType
.ELEMENT_TYPE_U8 => TryFormatPrimitiveNonDefault<ulong, ulong>(enumType, Unsafe.As<byte, ulong>(ref rawData), destination, out charsWritten, format),
1728
CorElementType
.ELEMENT_TYPE_R4 => TryFormatPrimitiveNonDefault<float, float>(enumType, Unsafe.As<byte, float>(ref rawData), destination, out charsWritten, format),
1729
CorElementType
.ELEMENT_TYPE_R8 => TryFormatPrimitiveNonDefault<double, double>(enumType, Unsafe.As<byte, double>(ref rawData), destination, out charsWritten, format),
1730
CorElementType
.ELEMENT_TYPE_I => TryFormatPrimitiveNonDefault<nint, nuint>(enumType, Unsafe.As<byte, nint>(ref rawData), destination, out charsWritten, format),
1731
CorElementType
.ELEMENT_TYPE_U => TryFormatPrimitiveNonDefault<nuint, nuint>(enumType, Unsafe.As<byte, nuint>(ref rawData), destination, out charsWritten, format),
1732
CorElementType
.ELEMENT_TYPE_CHAR => TryFormatPrimitiveNonDefault<char, char>(enumType, Unsafe.As<byte, char>(ref rawData), destination, out charsWritten, format),
2163
CorElementType
.ELEMENT_TYPE_I1 => TypeCode.SByte,
2164
CorElementType
.ELEMENT_TYPE_U1 => TypeCode.Byte,
2165
CorElementType
.ELEMENT_TYPE_I2 => TypeCode.Int16,
2166
CorElementType
.ELEMENT_TYPE_U2 => TypeCode.UInt16,
2167
CorElementType
.ELEMENT_TYPE_I4 => TypeCode.Int32,
2168
CorElementType
.ELEMENT_TYPE_U4 => TypeCode.UInt32,
2169
CorElementType
.ELEMENT_TYPE_I8 => TypeCode.Int64,
2170
CorElementType
.ELEMENT_TYPE_U8 => TypeCode.UInt64,
2171
CorElementType
.ELEMENT_TYPE_CHAR => TypeCode.Char,
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (1)
63
else if (fieldType.GetCorElementType() ==
CorElementType
.ELEMENT_TYPE_VALUETYPE)
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokeUtils.cs (63)
14
public static object ConvertOrWiden(RuntimeType srcType, object srcObject, RuntimeType dstType,
CorElementType
dstElementType)
31
case
CorElementType
.ELEMENT_TYPE_BOOLEAN:
35
case
CorElementType
.ELEMENT_TYPE_CHAR:
40
case
CorElementType
.ELEMENT_TYPE_I1:
45
case
CorElementType
.ELEMENT_TYPE_I2:
50
case
CorElementType
.ELEMENT_TYPE_I4:
55
case
CorElementType
.ELEMENT_TYPE_I8:
60
case
CorElementType
.ELEMENT_TYPE_U1:
65
case
CorElementType
.ELEMENT_TYPE_U2:
70
case
CorElementType
.ELEMENT_TYPE_U4:
75
case
CorElementType
.ELEMENT_TYPE_U8:
80
case
CorElementType
.ELEMENT_TYPE_R4:
91
case
CorElementType
.ELEMENT_TYPE_R8:
128
public static void PrimitiveWiden(ref byte srcElement, ref byte destElement,
CorElementType
srcElType,
CorElementType
destElType)
132
case
CorElementType
.ELEMENT_TYPE_U1:
135
case
CorElementType
.ELEMENT_TYPE_CHAR:
136
case
CorElementType
.ELEMENT_TYPE_I2:
137
case
CorElementType
.ELEMENT_TYPE_U2:
139
case
CorElementType
.ELEMENT_TYPE_I4:
140
case
CorElementType
.ELEMENT_TYPE_U4:
142
case
CorElementType
.ELEMENT_TYPE_I8:
143
case
CorElementType
.ELEMENT_TYPE_U8:
145
case
CorElementType
.ELEMENT_TYPE_R4:
147
case
CorElementType
.ELEMENT_TYPE_R8:
154
case
CorElementType
.ELEMENT_TYPE_I1:
157
case
CorElementType
.ELEMENT_TYPE_I2:
159
case
CorElementType
.ELEMENT_TYPE_I4:
161
case
CorElementType
.ELEMENT_TYPE_I8:
163
case
CorElementType
.ELEMENT_TYPE_R4:
165
case
CorElementType
.ELEMENT_TYPE_R8:
172
case
CorElementType
.ELEMENT_TYPE_U2:
173
case
CorElementType
.ELEMENT_TYPE_CHAR:
176
case
CorElementType
.ELEMENT_TYPE_U2:
177
case
CorElementType
.ELEMENT_TYPE_CHAR:
180
case
CorElementType
.ELEMENT_TYPE_I4:
181
case
CorElementType
.ELEMENT_TYPE_U4:
183
case
CorElementType
.ELEMENT_TYPE_I8:
184
case
CorElementType
.ELEMENT_TYPE_U8:
186
case
CorElementType
.ELEMENT_TYPE_R4:
188
case
CorElementType
.ELEMENT_TYPE_R8:
195
case
CorElementType
.ELEMENT_TYPE_I2:
198
case
CorElementType
.ELEMENT_TYPE_I4:
200
case
CorElementType
.ELEMENT_TYPE_I8:
202
case
CorElementType
.ELEMENT_TYPE_R4:
204
case
CorElementType
.ELEMENT_TYPE_R8:
211
case
CorElementType
.ELEMENT_TYPE_U4:
214
case
CorElementType
.ELEMENT_TYPE_I8:
215
case
CorElementType
.ELEMENT_TYPE_U8:
217
case
CorElementType
.ELEMENT_TYPE_R4:
219
case
CorElementType
.ELEMENT_TYPE_R8:
226
case
CorElementType
.ELEMENT_TYPE_I4:
229
case
CorElementType
.ELEMENT_TYPE_I8:
231
case
CorElementType
.ELEMENT_TYPE_R4:
233
case
CorElementType
.ELEMENT_TYPE_R8:
240
case
CorElementType
.ELEMENT_TYPE_U8:
243
case
CorElementType
.ELEMENT_TYPE_R4:
245
case
CorElementType
.ELEMENT_TYPE_R8:
252
case
CorElementType
.ELEMENT_TYPE_I8:
255
case
CorElementType
.ELEMENT_TYPE_R4:
257
case
CorElementType
.ELEMENT_TYPE_R8:
264
case
CorElementType
.ELEMENT_TYPE_R4:
265
Debug.Assert(destElType ==
CorElementType
.ELEMENT_TYPE_R8);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeHelpers.cs (3)
109
internal static bool IsPrimitiveType(this
CorElementType
et)
114
internal static bool CanPrimitiveWiden(
CorElementType
srcET,
CorElementType
dstET)
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (3)
736
internal
CorElementType
GetUnderlyingCorElementType()
751
CorElementType
corElemType = type.GetCorElementType();
752
if (corElemType ==
CorElementType
.ELEMENT_TYPE_BYREF)
src\System\Array.CoreCLR.cs (10)
95
private static
CorElementType
GetNormalizedIntegralArrayElementType(
CorElementType
elementType)
105
return (
CorElementType
)((int)elementType - shift);
192
CorElementType
srcElType = pMTsrc->GetPrimitiveCorElementType();
193
CorElementType
destElType = pMTdest->GetPrimitiveCorElementType();
319
CorElementType
srcElType = sourceArray.GetCorElementTypeOfElementType();
320
CorElementType
destElType = destinationArray.GetCorElementTypeOfElementType();
573
CorElementType
srcType = pValueMethodTable->GetPrimitiveCorElementType();
574
CorElementType
targetType = pElementMethodTable->GetPrimitiveCorElementType();
652
internal extern
CorElementType
GetCorElementTypeOfElementType();
src\System\Enum.CoreCLR.cs (5)
18
private static unsafe
CorElementType
InternalGetCorElementType(RuntimeType rt)
21
CorElementType
elementType = rt.GetNativeTypeHandle().AsMethodTable()->GetPrimitiveCorElementType();
27
private unsafe
CorElementType
InternalGetCorElementType()
29
CorElementType
elementType = RuntimeHelpers.GetMethodTable(this)->GetPrimitiveCorElementType();
69
Debug.Assert(s_underlyingTypes[(int)
CorElementType
.ELEMENT_TYPE_U] == typeof(nuint));
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (16)
252
CorElementType
corType = ((RuntimeType)type).GetCorElementType();
256
case
CorElementType
.ELEMENT_TYPE_I1:
257
case
CorElementType
.ELEMENT_TYPE_U1:
258
case
CorElementType
.ELEMENT_TYPE_BOOLEAN:
259
case
CorElementType
.ELEMENT_TYPE_I2:
260
case
CorElementType
.ELEMENT_TYPE_U2:
261
case
CorElementType
.ELEMENT_TYPE_CHAR:
262
case
CorElementType
.ELEMENT_TYPE_I4:
263
case
CorElementType
.ELEMENT_TYPE_U4:
264
case
CorElementType
.ELEMENT_TYPE_R4:
265
case
CorElementType
.ELEMENT_TYPE_I8:
266
case
CorElementType
.ELEMENT_TYPE_U8:
267
case
CorElementType
.ELEMENT_TYPE_R8:
276
SetConstantValue(new QCallModule(ref module), tk, (int)
CorElementType
.ELEMENT_TYPE_STRING, pString);
282
SetConstantValue(new QCallModule(ref module), tk, (int)
CorElementType
.ELEMENT_TYPE_I8, &ticks);
297
SetConstantValue(new QCallModule(ref module), tk, (int)
CorElementType
.ELEMENT_TYPE_CLASS, null);
src\System\Reflection\Emit\SignatureHelper.cs (35)
263
AddElementType(
CorElementType
.ELEMENT_TYPE_PINNED);
288
AddElementType(
CorElementType
.ELEMENT_TYPE_CMOD_OPT);
310
AddElementType(
CorElementType
.ELEMENT_TYPE_CMOD_REQD);
327
AddElementType(
CorElementType
.ELEMENT_TYPE_MVAR);
329
AddElementType(
CorElementType
.ELEMENT_TYPE_VAR);
335
AddElementType(
CorElementType
.ELEMENT_TYPE_GENERICINST);
361
InternalAddTypeToken(tkType,
CorElementType
.ELEMENT_TYPE_VALUETYPE);
365
InternalAddTypeToken(tkType,
CorElementType
.ELEMENT_TYPE_CLASS);
384
InternalAddTypeToken(tkType,
CorElementType
.ELEMENT_TYPE_VALUETYPE);
388
InternalAddTypeToken(tkType,
CorElementType
.ELEMENT_TYPE_CLASS);
393
AddElementType(
CorElementType
.ELEMENT_TYPE_BYREF);
399
AddElementType(
CorElementType
.ELEMENT_TYPE_PTR);
406
AddElementType(
CorElementType
.ELEMENT_TYPE_SZARRAY);
412
AddElementType(
CorElementType
.ELEMENT_TYPE_ARRAY);
427
CorElementType
type =
CorElementType
.ELEMENT_TYPE_MAX;
434
if (type ==
CorElementType
.ELEMENT_TYPE_CLASS)
437
type =
CorElementType
.ELEMENT_TYPE_OBJECT;
439
type =
CorElementType
.ELEMENT_TYPE_STRING;
453
InternalAddTypeToken(m_module.GetTypeMetadataToken(clsArgument),
CorElementType
.ELEMENT_TYPE_VALUETYPE);
457
InternalAddTypeToken(m_module.GetTypeMetadataToken(clsArgument),
CorElementType
.ELEMENT_TYPE_CLASS);
489
private void AddElementType(
CorElementType
cvt)
532
private void InternalAddTypeToken(int clsToken,
CorElementType
CorType)
543
AddElementType(
CorElementType
.ELEMENT_TYPE_INTERNAL);
651
internal static bool IsSimpleType(
CorElementType
type)
653
if (type <=
CorElementType
.ELEMENT_TYPE_STRING)
656
if (type ==
CorElementType
.ELEMENT_TYPE_TYPEDBYREF || type ==
CorElementType
.ELEMENT_TYPE_I || type ==
CorElementType
.ELEMENT_TYPE_U || type ==
CorElementType
.ELEMENT_TYPE_OBJECT)
725
temp[newSigSize - 1] = (byte)
CorElementType
.ELEMENT_TYPE_END;
751
AddElementType(
CorElementType
.ELEMENT_TYPE_CMOD_OPT);
774
AddElementType(
CorElementType
.ELEMENT_TYPE_CMOD_REQD);
836
AddElementType(
CorElementType
.ELEMENT_TYPE_SENTINEL);
876
AddElementType(
CorElementType
.ELEMENT_TYPE_END);
src\System\Reflection\MdConstant.cs (31)
10
string? stringVal = scope.GetDefaultValue(token, out long buffer, out int length, out
CorElementType
corElementType);
28
case
CorElementType
.ELEMENT_TYPE_VOID:
31
case
CorElementType
.ELEMENT_TYPE_CHAR:
35
case
CorElementType
.ELEMENT_TYPE_I1:
39
case
CorElementType
.ELEMENT_TYPE_U1:
43
case
CorElementType
.ELEMENT_TYPE_I2:
47
case
CorElementType
.ELEMENT_TYPE_U2:
51
case
CorElementType
.ELEMENT_TYPE_I4:
55
case
CorElementType
.ELEMENT_TYPE_U4:
59
case
CorElementType
.ELEMENT_TYPE_I8:
63
case
CorElementType
.ELEMENT_TYPE_U8:
67
case
CorElementType
.ELEMENT_TYPE_CLASS:
85
case
CorElementType
.ELEMENT_TYPE_VOID:
88
case
CorElementType
.ELEMENT_TYPE_I8:
92
case
CorElementType
.ELEMENT_TYPE_U8:
96
case
CorElementType
.ELEMENT_TYPE_CLASS:
110
CorElementType
.ELEMENT_TYPE_VOID => DBNull.Value,
111
CorElementType
.ELEMENT_TYPE_CHAR => *(char*)&buffer,
112
CorElementType
.ELEMENT_TYPE_I1 => *(sbyte*)&buffer,
113
CorElementType
.ELEMENT_TYPE_U1 => *(byte*)&buffer,
114
CorElementType
.ELEMENT_TYPE_I2 => *(short*)&buffer,
115
CorElementType
.ELEMENT_TYPE_U2 => *(ushort*)&buffer,
116
CorElementType
.ELEMENT_TYPE_I4 => *(int*)&buffer,
117
CorElementType
.ELEMENT_TYPE_U4 => *(uint*)&buffer,
118
CorElementType
.ELEMENT_TYPE_I8 => buffer,
119
CorElementType
.ELEMENT_TYPE_U8 => (ulong)buffer,
120
CorElementType
.ELEMENT_TYPE_BOOLEAN => (*(int*)&buffer != 0),
121
CorElementType
.ELEMENT_TYPE_R4 => *(float*)&buffer,
122
CorElementType
.ELEMENT_TYPE_R8 => *(double*)&buffer,
123
CorElementType
.ELEMENT_TYPE_STRING => stringVal ?? string.Empty,
124
CorElementType
.ELEMENT_TYPE_CLASS => null,
src\System\Reflection\MdImport.cs (3)
379
public unsafe string? GetDefaultValue(int mdToken, out long value, out int length, out
CorElementType
corElementType)
383
corElementType = (
CorElementType
)corElementTypeRaw;
385
if (corElementType is
CorElementType
.ELEMENT_TYPE_STRING
src\System\Reflection\RuntimeCustomAttributeData.cs (14)
630
Boolean =
CorElementType
.ELEMENT_TYPE_BOOLEAN,
631
Char =
CorElementType
.ELEMENT_TYPE_CHAR,
632
SByte =
CorElementType
.ELEMENT_TYPE_I1,
633
Byte =
CorElementType
.ELEMENT_TYPE_U1,
634
Int16 =
CorElementType
.ELEMENT_TYPE_I2,
635
UInt16 =
CorElementType
.ELEMENT_TYPE_U2,
636
Int32 =
CorElementType
.ELEMENT_TYPE_I4,
637
UInt32 =
CorElementType
.ELEMENT_TYPE_U4,
638
Int64 =
CorElementType
.ELEMENT_TYPE_I8,
639
UInt64 =
CorElementType
.ELEMENT_TYPE_U8,
640
Float =
CorElementType
.ELEMENT_TYPE_R4,
641
Double =
CorElementType
.ELEMENT_TYPE_R8,
642
String =
CorElementType
.ELEMENT_TYPE_STRING,
643
Array =
CorElementType
.ELEMENT_TYPE_SZARRAY,
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (2)
869
/// Get the <see cref="
CorElementType
"/> representing primitive-like type. Enums are represented by underlying type.
873
public extern
CorElementType
GetPrimitiveCorElementType();
src\System\RuntimeHandles.cs (25)
82
CorElementType
corElemType = type.GetCorElementType();
83
if (!((corElemType >=
CorElementType
.ELEMENT_TYPE_VOID && corElemType <
CorElementType
.ELEMENT_TYPE_PTR) ||
84
corElemType ==
CorElementType
.ELEMENT_TYPE_VALUETYPE ||
85
corElemType ==
CorElementType
.ELEMENT_TYPE_CLASS ||
86
corElemType ==
CorElementType
.ELEMENT_TYPE_TYPEDBYREF ||
87
corElemType ==
CorElementType
.ELEMENT_TYPE_I ||
88
corElemType ==
CorElementType
.ELEMENT_TYPE_U ||
89
corElemType ==
CorElementType
.ELEMENT_TYPE_OBJECT))
105
CorElementType
corElemType = type.GetCorElementType();
106
return corElemType ==
CorElementType
.ELEMENT_TYPE_BYREF;
111
CorElementType
corElemType = type.GetCorElementType();
112
return corElemType ==
CorElementType
.ELEMENT_TYPE_PTR;
117
CorElementType
corElemType = type.GetCorElementType();
118
return corElemType ==
CorElementType
.ELEMENT_TYPE_ARRAY || corElemType ==
CorElementType
.ELEMENT_TYPE_SZARRAY;
123
CorElementType
corElemType = type.GetCorElementType();
124
return corElemType ==
CorElementType
.ELEMENT_TYPE_SZARRAY;
129
CorElementType
corElemType = type.GetCorElementType();
130
return corElemType ==
CorElementType
.ELEMENT_TYPE_FNPTR;
135
CorElementType
corElemType = type.GetCorElementType();
137
return corElemType ==
CorElementType
.ELEMENT_TYPE_ARRAY || corElemType ==
CorElementType
.ELEMENT_TYPE_SZARRAY // IsArray
138
|| (corElemType ==
CorElementType
.ELEMENT_TYPE_PTR) // IsPointer
139
|| (corElemType ==
CorElementType
.ELEMENT_TYPE_BYREF); // IsByRef
src\System\RuntimeType.CoreCLR.cs (7)
3694
internal
CorElementType
GetCorElementType()
3696
CorElementType
ret = (
CorElementType
)GetNativeTypeHandle().GetCorElementType();
3750
CorElementType
valueCorElement = valueType.GetUnderlyingCorElementType();
3751
CorElementType
targetCorElement = targetType.GetUnderlyingCorElementType();
3771
CorElementType
srcElementType = srcType.GetUnderlyingCorElementType();
3772
CorElementType
dstElementType = GetUnderlyingCorElementType();