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

◆ IsInterfaceImplemented()

static bool System.Runtime.InteropServices.DynamicInterfaceCastableHelpers.IsInterfaceImplemented ( IDynamicInterfaceCastable castable,
RuntimeType interfaceType,
bool throwIfNotImplemented )
inlinestaticpackage

Definition at line 8 of file DynamicInterfaceCastableHelpers.cs.

9 {
10 bool flag = castable.IsInterfaceImplemented(new RuntimeTypeHandle(interfaceType), throwIfNotImplemented);
11 if (!flag && throwIfNotImplemented)
12 {
13 throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, castable.GetType(), interfaceType));
14 }
15 return flag;
16 }

References System.SR.Format(), System.SR.InvalidCast_FromTo, and System.Runtime.InteropServices.IDynamicInterfaceCastable.IsInterfaceImplemented().