예제 #1
0
파일: Services.cs 프로젝트: Vladsz83/ignite
        /// <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;
                }
            }
        }
예제 #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));
 }
예제 #3
0
파일: Services.cs 프로젝트: zmyer/gridgain
 /// <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));
 }
예제 #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;
            }
        }
예제 #5
0
파일: Services.cs 프로젝트: Vladsz83/ignite
 /// <summary>
 /// Reads the deployment result.
 /// </summary>
 private object ReadDeploymentResult(IBinaryStream s)
 {
     ServiceProxySerializer.ReadDeploymentResult(s, Marshaller, _keepBinary);
     return(null);
 }
예제 #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));
 }