internal static String CallContextKey = "__CallContext";
internal static String UriKey = "__Uri";
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- internal extern void InitMessage (MonoMethod method, object [] out_args);
+ 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;
+ }
+ }
public MonoMethodMessage (MethodBase method, object [] out_args)
{
ICALL_TYPE(ARES, "System.Runtime.Remoting.Messaging.AsyncResult", ARES_1)
ICALL(ARES_1, "Invoke", ves_icall_System_Runtime_Remoting_Messaging_AsyncResult_Invoke)
-ICALL_TYPE(MONOMM, "System.Runtime.Remoting.Messaging.MonoMethodMessage", MONOMM_1)
-ICALL(MONOMM_1, "InitMessage", ves_icall_MonoMethodMessage_InitMessage)
-
#ifndef DISABLE_REMOTING
ICALL_TYPE(REALP, "System.Runtime.Remoting.Proxies.RealProxy", REALP_1)
ICALL(REALP_1, "InternalGetProxyType", ves_icall_Remoting_RealProxy_InternalGetProxyType)
return 9;
}
-ICALL_EXPORT void
-ves_icall_MonoMethodMessage_InitMessage (MonoMethodMessage *this_obj,
- MonoReflectionMethod *method,
- MonoArray *out_args)
-{
- MonoError error;
- mono_message_init (mono_object_domain (this_obj), this_obj, method, out_args, &error);
- mono_error_set_pending_exception (&error);
-}
-
#ifndef DISABLE_REMOTING
ICALL_EXPORT MonoBoolean
ves_icall_IsTransparentProxy (MonoObject *proxy)