internal CallPayload(PSharpRealProxy realProxy, ReplyTarget <TResult> replyTarget, MethodInfo method, object[] args) { this.realProxy = realProxy; this.replyTarget = replyTarget; this.method = method; this.args = args; }
IMethodReturnMessage Invoke1 <TResult>(IMethodCallMessage callMsg) { // TODO: Create a reply ID once we know what information we need to include in it. var replyTarget = new ReplyTarget <TResult>(null, callerMachineId); PSharpRuntime.SendEvent(hostMachineId, eventFactory(), new CallPayload <TResult>(this, replyTarget, (MethodInfo)callMsg.MethodBase, callMsg.Args)); return(new ReturnMessage(replyTarget.tcs.Task, null, 0, callMsg.LogicalCallContext, callMsg)); }