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)
62
CastResult
result = CastCache.TryGet(s_table!, (nuint)mt, (nuint)toTypeHnd);
63
if (result ==
CastResult
.CanCast)
67
else if (result ==
CastResult
.CannotCast)
208
CastResult
result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.GetMethodTable(obj), (nuint)toTypeHnd);
209
if (result ==
CastResult
.CanCast)
213
else if (result ==
CastResult
.CannotCast)
228
CastResult
result;
236
if (result !=
CastResult
.CanCast)
249
Debug.Assert(result !=
CastResult
.CannotCast);
257
CastResult
result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.GetMethodTable(obj), (nuint)toTypeHnd);
258
if (result ==
CastResult
.CanCast)
467
CastResult
result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.GetMethodTable(obj), (nuint)elementType);
468
if (result ==
CastResult
.CanCast)
499
CastResult
result = CastCache.TryGet(s_table!, (nuint)RuntimeHelpers.GetMethodTable(obj), (nuint)elementType);
500
if (result ==
CastResult
.CanCast)
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (7)
1136
CastResult
.CanCast => true,
1137
CastResult
.CannotCast => false,
1150
CastResult
.CanCast => true,
1151
CastResult
.CannotCast => false,
1160
private static
CastResult
TryCanCastTo(TypeHandle srcTH, TypeHandle destTH)
1164
return
CastResult
.CanCast;
1167
return
CastResult
.CannotCast;