Exemple #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;
                }
            }
        }
Exemple #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));
 }
Exemple #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));
 }
Exemple #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;
            }
        }
Exemple #5
0
 /// <summary>
 /// Reads the deployment result.
 /// </summary>
 private object ReadDeploymentResult(IBinaryStream s)
 {
     ServiceProxySerializer.ReadDeploymentResult(s, Marshaller, _keepBinary);
     return(null);
 }
Exemple #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));
 }