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