Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ ForwardCallToInvokeMember()

object System.RuntimeType.ForwardCallToInvokeMember ( string memberName,
BindingFlags flags,
object target,
object[] aArgs,
bool[] aArgsIsByRef,
int[] aArgsWrapperTypes,
Type[] aArgsTypes,
Type retType )
inlineprivate

Definition at line 3265 of file RuntimeType.cs.

3266 {
3268 {
3269 throw new NotSupportedException(SR.NotSupported_COM);
3270 }
3271 int num = aArgs.Length;
3272 ParameterModifier[] array = null;
3273 if (num > 0)
3274 {
3276 for (int i = 0; i < num; i++)
3277 {
3279 }
3281 if (aArgsWrapperTypes != null)
3282 {
3284 }
3285 }
3286 flags |= BindingFlags.DoNotWrapExceptions;
3287 object obj = InvokeMember(memberName, flags, null, target, aArgs, array, null, null);
3288 for (int j = 0; j < num; j++)
3289 {
3290 if (array[0][j] && aArgs[j] != null)
3291 {
3292 Type type = aArgsTypes[j];
3293 if ((object)type != aArgs[j].GetType())
3294 {
3295 aArgs[j] = ForwardCallBinder.ChangeType(aArgs[j], type, null);
3296 }
3297 }
3298 }
3299 if (obj != null && (object)retType != obj.GetType())
3300 {
3301 obj = ForwardCallBinder.ChangeType(obj, retType, null);
3302 }
3303 return obj;
3304 }
override object InvokeMember(string name, BindingFlags bindingFlags, Binder binder, object target, object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParams)
static void WrapArgsForInvokeCall(object[] aArgs, int[] aArgsWrapperTypes)
static OleAutBinder ForwardCallBinder
new Type GetType()
Definition Type.cs:475

References System.array, System.RuntimeType.ForwardCallBinder, System.Type.GetType(), System.RuntimeType.InvokeMember(), System.Runtime.InteropServices.Marshal.IsBuiltInComSupported, System.SR.NotSupported_COM, System.obj, System.type, and System.RuntimeType.WrapArgsForInvokeCall().