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