示例#1
0
 public void Push(IClientChannelSink sink, object state)
 {
     this._stack = new ClientChannelSinkStack.SinkStack()
     {
         PrevStack = this._stack,
         Sink      = sink,
         State     = state
     };
 }
示例#2
0
        public void AsyncProcessResponse(ITransportHeaders headers, Stream stream)
        {
            if (this._replySink == null)
            {
                return;
            }
            if (this._stack == null)
            {
                throw new RemotingException(Environment.GetResourceString("Remoting_Channel_CantCallAPRWhenStackEmpty"));
            }
            IClientChannelSink clientChannelSink = this._stack.Sink;
            object             obj = this._stack.State;

            this._stack = this._stack.PrevStack;
            object            state    = obj;
            ITransportHeaders headers1 = headers;
            Stream            stream1  = stream;

            clientChannelSink.AsyncProcessResponse((IClientResponseChannelSinkStack)this, state, headers1, stream1);
        }
示例#3
0
        public object Pop(IClientChannelSink sink)
        {
            if (this._stack == null)
            {
                throw new RemotingException(Environment.GetResourceString("Remoting_Channel_PopOnEmptySinkStack"));
            }
            while (this._stack.Sink != sink)
            {
                this._stack = this._stack.PrevStack;
                if (this._stack == null)
                {
                    break;
                }
            }
            if (this._stack.Sink == null)
            {
                throw new RemotingException(Environment.GetResourceString("Remoting_Channel_PopFromSinkStackWithoutPush"));
            }
            object obj = this._stack.State;

            this._stack = this._stack.PrevStack;
            return(obj);
        }