Exemplo n.º 1
0
        public int SendAsyncRequest(ProxyOutgoingAsyncBase outAsync)
        {
            lock (this)
            {
                if (!_initialized)
                {
                    outAsync.Cancelable(this); // This will throw if the request is canceled
                }

                if (!Initialized())
                {
                    _requests.AddLast(outAsync);
                    return(OutgoingAsyncBase.AsyncStatusQueued);
                }
            }
            Debug.Assert(_connection != null);
            return(outAsync.InvokeRemote(_connection, _compress, _response));
        }
Exemplo n.º 2
0
        public void SendAsyncRequest(ProxyOutgoingAsyncBase outAsync)
        {
            lock (this)
            {
                if (!_initialized)
                {
                    outAsync.Cancelable(this); // This will throw if the request is canceled
                }

                if (!Initialized())
                {
                    _requests.AddLast(outAsync);
                    return;
                }
            }
            Debug.Assert(_connection != null);
            outAsync.InvokeRemote(_connection, _compress, !outAsync.IsOneway);
        }