internal void InitMessage (MonoMethod method, object [] out_args) { this.method = method; ParameterInfo[] paramInfo = method.GetParametersInternal (); int param_count = paramInfo.Length; args = new object[param_count]; arg_types = new byte[param_count]; asyncResult = null; call_type = CallType.Sync; names = new string[param_count]; for (int i = 0; i < param_count; i++) { names[i] = paramInfo[i].Name; } bool hasOutArgs = out_args != null; int j = 0; for (int i = 0; i < param_count; i++) { byte arg_type; bool isOut = paramInfo[i].IsOut; if (paramInfo[i].ParameterType.IsByRef) { if (hasOutArgs) args[i] = out_args[j++]; arg_type = 2; // OUT if (!isOut) arg_type |= 1; // INOUT } else { arg_type = 1; // IN if (isOut) arg_type |= 4; // IN, COPY OUT } arg_types[i] = arg_type; } }