public RpcCallResultMessage CreateCallResultMessage(ITransportChannel channel, IRpcObjectRepository localRepository, RpcMethodCallMessage call, MethodInfo calledMethod, object result) { var resultArgument = CreateRpcArgument(channel, localRepository, result, calledMethod.ReturnType); var resultMessage = new RpcCallResultMessage { CallId = call.CallId, Type = RpcMessageType.CallMethodResult, Result = resultArgument }; return(resultMessage); }
public object DecodeRpcCallResultMessage(IRpcChannel channel, IRpcObjectRepository localRepository, IRpcObjectRepository remoteRepository, IRpcSerializer serializer, RpcCallResultMessage message, Type resultType) { if (message.Type == RpcMessageType.Exception) { throw new TargetInvocationException((Exception)message.Result.Value); } return(DecodeRpcArgument(channel, localRepository, remoteRepository, serializer, message.Result, resultType)); }