13 references to CastHelpers
System.Private.CoreLib (13)
src\System\Array.CoreCLR.cs (5)
256
CastHelpers
.Unbox_Nullable(ref dest, pDestMT, obj);
310
Unsafe.Add(ref destData, i) =
CastHelpers
.ChkCastAny(destTH, obj);
540
&&
CastHelpers
.IsInstanceOfAny(pElementMethodTable, value) == null)
550
if (
CastHelpers
.IsInstanceOfAny(pElementMethodTable, value) != null)
554
CastHelpers
.Unbox_Nullable(ref offsetDataRef, pElementMethodTable, value);
src\System\Runtime\CompilerServices\CastHelpers.cs (3)
576
CastHelpers
.ThrowInvalidCastException(obj, typeMT);
656
CastHelpers
.ThrowInvalidCastException(obj, pMT1);
673
CastHelpers
.ThrowInvalidCastException(pMT1, pMT2);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (2)
1141
return CastCache.TryGet(
CastHelpers
.s_table!, (nuint)srcTH.m_asTAddr, (nuint)destTH.m_asTAddr);
1149
&&
CastHelpers
.IsNullableForType(destTH.AsMethodTable(), srcTH.AsMethodTable()))
src\System\RuntimeHandles.cs (2)
1169
return
CastHelpers
.ReboxFromNullable(pMT, src);
1182
CastHelpers
.Unbox_Nullable(
src\System\RuntimeType.CoreCLR.cs (1)
3313
bool ret =
CastHelpers
.IsInstanceOfAny(GetUnderlyingNativeHandle().ToPointer(), o) is not null;