Exemple #1
0
        private object InvokeBeginService(MethodCall methodCall, ProxyOperationRuntime operation)
        {
            AsyncCallback callback;
            object        asyncState;

            object[] ins = operation.MapAsyncBeginInputs(methodCall, out callback, out asyncState);
            object   ret = _serviceChannel.BeginCall(operation.Action, operation.IsOneWay, operation, ins, callback, asyncState);

            return(ret);
        }
Exemple #2
0
        IMethodReturnMessage InvokeBeginService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
        {
            AsyncCallback callback;
            object        asyncState;

            object[] ins = operation.MapAsyncBeginInputs(methodCall, out callback, out asyncState);
            object   ret = this.serviceChannel.BeginCall(operation.Action, operation.IsOneWay, operation, ins, callback, asyncState);

            return(CreateReturnMessage(ret, null, methodCall));
        }
            protected IAsyncResult BeginInvoke(string methodName, object[] args, AsyncCallback callback, object state)
            {
                object[] destinationArray = new object[args.Length + 2];
                Array.Copy(args, destinationArray, args.Length);
                destinationArray[destinationArray.Length - 2] = callback;
                destinationArray[destinationArray.Length - 1] = state;
                IMethodCallMessage    methodCall      = new MethodCallMessage <TChannel, T>(destinationArray);
                ProxyOperationRuntime operationByName = this.GetOperationByName(methodName);

                object[] ins = operationByName.MapAsyncBeginInputs(methodCall, out callback, out state);
                return(this.channel.BeginCall(operationByName.Action, operationByName.IsOneWay, operationByName, ins, callback, state));
            }
Exemple #4
0
            protected IAsyncResult BeginInvoke(string methodName, object[] args, AsyncCallback callback, object state)
            {
                object[] inArgs = new object[args.Length + 2];
                Array.Copy(args, inArgs, args.Length);
                inArgs[inArgs.Length - 2] = callback;
                inArgs[inArgs.Length - 1] = state;

                MethodCall            methodCall = new MethodCall(inArgs);
                ProxyOperationRuntime op         = GetOperationByName(methodName);

                object[] ins = op.MapAsyncBeginInputs(methodCall, out callback, out state);
                return(_channel.BeginCall(op.Action, op.IsOneWay, op, ins, callback, state));
            }