Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IsInstance_Helper()

static unsafe object System.Runtime.CompilerServices.CastHelpers.IsInstance_Helper ( void * toTypeHnd,
object obj )
inlinestaticprivate

Definition at line 252 of file CastHelpers.cs.

253 {
254 return TryGet((nuint)RuntimeHelpers.GetMethodTable(obj), (nuint)toTypeHnd) switch
255 {
256 CastResult.CanCast => obj,
257 CastResult.CannotCast => null,
258 _ => IsInstanceOfAny_NoCacheLookup(toTypeHnd, obj),
259 };
260 }
static unsafe object IsInstanceOfAny_NoCacheLookup(void *toTypeHnd, object obj)
static CastResult TryGet(nuint source, nuint target)

References System.Runtime.CompilerServices.RuntimeHelpers.GetMethodTable(), System.Runtime.CompilerServices.CastHelpers.IsInstanceOfAny_NoCacheLookup(), System.obj, and System.Runtime.CompilerServices.CastHelpers.TryGet().

Referenced by System.Runtime.CompilerServices.CastHelpers.IsInstanceOfInterface().