Exemplo n.º 1
0
        /// <summary>
        /// Invokes the service proxy method.
        /// </summary>
        /// <param name="proxy">Unmanaged proxy.</param>
        /// <param name="methodName">Name of the method.</param>
        /// <param name="method">Method to invoke.</param>
        /// <param name="args">Arguments.</param>
        /// <param name="platformType">The platform.</param>
        /// <param name="callCtx">Service call context.</param>
        /// <returns>
        /// Invocation result.
        /// </returns>
        private object InvokeProxyMethod(IPlatformTargetInternal proxy, string methodName,
                                         MethodBase method, object[] args, PlatformType platformType, IServiceCallContext callCtx)
        {
            bool locRegisterSameJavaType = Marshaller.RegisterSameJavaTypeTl.Value;

            if (platformType == PlatformType.Java)
            {
                Marshaller.RegisterSameJavaTypeTl.Value = true;
            }

            try
            {
                return(DoOutInOp(OpInvokeMethod,
                                 writer => ServiceProxySerializer.WriteProxyMethod(writer, methodName, method, args, platformType, callCtx),
                                 (stream, res) => ServiceProxySerializer.ReadInvocationResult(stream, Marshaller, _keepBinary),
                                 proxy));
            }
            finally
            {
                if (platformType == PlatformType.Java)
                {
                    Marshaller.RegisterSameJavaTypeTl.Value = locRegisterSameJavaType;
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Invokes the service proxy method.
 /// </summary>
 /// <param name="proxy">Unmanaged proxy.</param>
 /// <param name="method">Method to invoke.</param>
 /// <param name="args">Arguments.</param>
 /// <param name="platform">The platform.</param>
 /// <returns>
 /// Invocation result.
 /// </returns>
 private unsafe object InvokeProxyMethod(IUnmanagedTarget proxy, MethodBase method, object[] args,
                                         Platform platform)
 {
     return(DoOutInOp(OpInvokeMethod,
                      writer => ServiceProxySerializer.WriteProxyMethod(writer, method, args, platform),
                      (stream, res) => ServiceProxySerializer.ReadInvocationResult(stream, Marshaller, _keepBinary), proxy.Target));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Invokes the service proxy method.
 /// </summary>
 /// <param name="proxy">Unmanaged proxy.</param>
 /// <param name="methodName">Name of the method.</param>
 /// <param name="method">Method to invoke.</param>
 /// <param name="args">Arguments.</param>
 /// <param name="platform">The platform.</param>
 /// <returns>
 /// Invocation result.
 /// </returns>
 private object InvokeProxyMethod(IPlatformTargetInternal proxy, string methodName,
                                  MethodBase method, object[] args, Platform platform)
 {
     return(DoOutInOp(OpInvokeMethod,
                      writer => ServiceProxySerializer.WriteProxyMethod(writer, methodName, method, args, platform),
                      (stream, res) => ServiceProxySerializer.ReadInvocationResult(stream, Marshaller, _keepBinary),
                      proxy));
 }
Exemplo n.º 4
0
        /// <summary>
        /// Invokes the service proxy method.
        /// </summary>
        /// <param name="proxy">Unmanaged proxy.</param>
        /// <param name="methodName">Name of the method.</param>
        /// <param name="method">Method to invoke.</param>
        /// <param name="args">Arguments.</param>
        /// <param name="platformType">The platform.</param>
        /// <returns>
        /// Invocation result.
        /// </returns>
        private object InvokeProxyMethod(IPlatformTargetInternal proxy, string methodName,
                                         MethodBase method, object[] args, PlatformType platformType)
        {
            Marshaller.RegisterSameJavaType.Value = true;

            try
            {
                return(DoOutInOp(OpInvokeMethod,
                                 writer => ServiceProxySerializer.WriteProxyMethod(writer, methodName, method, args, platformType),
                                 (stream, res) => ServiceProxySerializer.ReadInvocationResult(stream, Marshaller, _keepBinary),
                                 proxy));
            }
            finally
            {
                Marshaller.RegisterSameJavaType.Value = false;
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// Reads the deployment result.
 /// </summary>
 private object ReadDeploymentResult(IBinaryStream s)
 {
     ServiceProxySerializer.ReadDeploymentResult(s, Marshaller, _keepBinary);
     return(null);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Invokes the service proxy method.
 /// </summary>
 /// <param name="proxy">Unmanaged proxy.</param>
 /// <param name="method">Method to invoke.</param>
 /// <param name="args">Arguments.</param>
 /// <returns>
 /// Invocation result.
 /// </returns>
 private unsafe object InvokeProxyMethod(IUnmanagedTarget proxy, MethodBase method, object[] args)
 {
     return(DoOutInOp(OpInvokeMethod,
                      writer => ServiceProxySerializer.WriteProxyMethod(writer, method, args),
                      stream => ServiceProxySerializer.ReadInvocationResult(stream, Marshaller, KeepPortable), proxy.Target));
 }