示例#1
0
        private object InvokeBeginService(MethodCall methodCall, ProxyOperationRuntime operation)
        {
            object[] ins = operation.MapAsyncBeginInputs(methodCall, out AsyncCallback callback, out object asyncState);
            object   ret = _serviceChannel.BeginCall(operation.Action, operation.IsOneWay, operation, ins, callback, asyncState);

            return(ret);
        }
示例#2
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));
            }