26 references to CastResult
System.Private.CoreLib (26)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\CastCache.cs (4)
140
internal
CastResult
TryGet(nuint source, nuint target)
147
internal static
CastResult
TryGet(int[] table, nuint source, nuint target)
191
return (
CastResult
)entryTargetAndResult;
205
return
CastResult
.MaybeCast;
src\System\Runtime\CompilerServices\CastHelpers.cs (15)
70
CastResult
result = CastCache.TryGet(s_table!, (nuint)mt, (nuint)toTypeHnd);
71
if (result ==
CastResult
.CanCast)
75
else if (result ==
CastResult
.CannotCast)
216
CastResult
result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.GetMethodTable(obj), (nuint)toTypeHnd);
217
if (result ==
CastResult
.CanCast)
221
else if (result ==
CastResult
.CannotCast)
236
CastResult
result;
244
if (result !=
CastResult
.CanCast)
257
Debug.Assert(result !=
CastResult
.CannotCast);
265
CastResult
result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.GetMethodTable(obj), (nuint)toTypeHnd);
266
if (result ==
CastResult
.CanCast)
475
CastResult
result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.GetMethodTable(obj), (nuint)elementType);
476
if (result ==
CastResult
.CanCast)
507
CastResult
result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.GetMethodTable(obj), (nuint)elementType);
508
if (result ==
CastResult
.CanCast)
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (7)
1148
CastResult
.CanCast => true,
1149
CastResult
.CannotCast => false,
1162
CastResult
.CanCast => true,
1163
CastResult
.CannotCast => false,
1172
private static
CastResult
TryCanCastTo(TypeHandle srcTH, TypeHandle destTH)
1176
return
CastResult
.CanCast;
1179
return
CastResult
.CannotCast;