예제 #1
0
        public void Store(IServerChannelSink sink, object state)
        {
            if (this._stack == null)
            {
                throw new RemotingException(Environment.GetResourceString("Remoting_Channel_StoreOnEmptySinkStack"));
            }
Label_0018:
            if (this._stack.Sink != sink)
            {
                this._stack = this._stack.PrevStack;
                if (this._stack != null)
                {
                    goto Label_0018;
                }
            }
            if (this._stack.Sink == null)
            {
                throw new RemotingException(Environment.GetResourceString("Remoting_Channel_StoreOnSinkStackWithoutPush"));
            }
            SinkStack stack = new SinkStack {
                PrevStack = this._rememberedStack,
                Sink      = sink,
                State     = state
            };

            this._rememberedStack = stack;
            this.Pop(sink);
        }
예제 #2
0
        } // Pop

        /// <include file='doc\ChannelSinkStacks.uex' path='docs/doc[@for="ServerChannelSinkStack.Store"]/*' />
        public void Store(IServerChannelSink sink, Object state)
        {
            if (_stack == null)
            {
                throw new RemotingException(
                          Environment.GetResourceString(
                              "Remoting_Channel_StoreOnEmptySinkStack"));
            }

            // find this sink on the stack
            do
            {
                if (_stack.Sink == sink)
                {
                    break;
                }

                _stack = _stack.PrevStack;
            } while (_stack != null);

            if (_stack.Sink == null)
            {
                throw new RemotingException(
                          Environment.GetResourceString("Remoting_Channel_StoreOnSinkStackWithoutPush"));
            }

            SinkStack remStack = new SinkStack();

            remStack.PrevStack = _rememberedStack;
            remStack.Sink      = sink;
            remStack.State     = state;
            _rememberedStack   = remStack;

            Pop(sink);
        } // Store
예제 #3
0
        } // Push

        /// <include file='doc\ChannelSinkStacks.uex' path='docs/doc[@for="ServerChannelSinkStack.Pop"]/*' />
        public Object Pop(IServerChannelSink sink)
        {
            if (_stack == null)
            {
                throw new RemotingException(
                          Environment.GetResourceString("Remoting_Channel_PopOnEmptySinkStack"));
            }

            // find this sink on the stack
            do
            {
                if (_stack.Sink == sink)
                {
                    break;
                }

                _stack = _stack.PrevStack;
            } while (_stack != null);

            if (_stack.Sink == null)
            {
                throw new RemotingException(
                          Environment.GetResourceString("Remoting_Channel_PopFromSinkStackWithoutPush"));
            }

            Object state = _stack.State;

            _stack = _stack.PrevStack;

            return(state);
        } // Pop
예제 #4
0
        /// <include file='doc\ChannelSinkStacks.uex' path='docs/doc[@for="ServerChannelSinkStack.Push"]/*' />
        public void Push(IServerChannelSink sink, Object state)
        {
            SinkStack newStack = new SinkStack();

            newStack.PrevStack = _stack;
            newStack.Sink      = sink;
            newStack.State     = state;
            _stack             = newStack;
        } // Push
        public void Push(IClientChannelSink sink, object state)
        {
            SinkStack stack = new SinkStack {
                PrevStack = this._stack,
                Sink      = sink,
                State     = state
            };

            this._stack = stack;
        }
 public void AsyncProcessResponse(IMessage msg, ITransportHeaders headers, Stream stream)
 {
     if (this._stack == null)
     {
         throw new RemotingException(Environment.GetResourceString("Remoting_Channel_CantCallAPRWhenStackEmpty"));
     }
     IServerChannelSink sink = this._stack.Sink;
     object state = this._stack.State;
     this._stack = this._stack.PrevStack;
     sink.AsyncProcessResponse(this, state, msg, headers, stream);
 }
예제 #7
0
        public void AsyncProcessResponse(IMessage msg, ITransportHeaders headers, Stream stream)
        {
            if (this._stack == null)
            {
                throw new RemotingException(Environment.GetResourceString("Remoting_Channel_CantCallAPRWhenStackEmpty"));
            }
            IServerChannelSink sink  = this._stack.Sink;
            object             state = this._stack.State;

            this._stack = this._stack.PrevStack;
            sink.AsyncProcessResponse(this, state, msg, headers, stream);
        }
 public Stream GetResponseStream(IMessage msg, ITransportHeaders headers)
 {
     if (this._stack == null)
     {
         throw new RemotingException(Environment.GetResourceString("Remoting_Channel_CantCallGetResponseStreamWhenStackEmpty"));
     }
     IServerChannelSink sink = this._stack.Sink;
     object state = this._stack.State;
     this._stack = this._stack.PrevStack;
     Stream stream = sink.GetResponseStream(this, state, msg, headers);
     this.Push(sink, state);
     return stream;
 }
예제 #9
0
        public Stream GetResponseStream(IMessage msg, ITransportHeaders headers)
        {
            if (this._stack == null)
            {
                throw new RemotingException(Environment.GetResourceString("Remoting_Channel_CantCallGetResponseStreamWhenStackEmpty"));
            }
            IServerChannelSink sink  = this._stack.Sink;
            object             state = this._stack.State;

            this._stack = this._stack.PrevStack;
            Stream stream = sink.GetResponseStream(this, state, msg, headers);

            this.Push(sink, state);
            return(stream);
        }
예제 #10
0
 private void FlipRememberedStack()
 {
     if (this._stack != null)
     {
         throw new RemotingException(Environment.GetResourceString("Remoting_Channel_CantCallFRSWhenStackEmtpy"));
     }
     while (this._rememberedStack != null)
     {
         SinkStack stack = new SinkStack {
             PrevStack = this._stack,
             Sink      = this._rememberedStack.Sink,
             State     = this._rememberedStack.State
         };
         this._stack           = stack;
         this._rememberedStack = this._rememberedStack.PrevStack;
     }
 }
 private void FlipRememberedStack()
 {
     if (this._stack != null)
     {
         throw new RemotingException(Environment.GetResourceString("Remoting_Channel_CantCallFRSWhenStackEmtpy"));
     }
     while (this._rememberedStack != null)
     {
         SinkStack stack = new SinkStack {
             PrevStack = this._stack,
             Sink = this._rememberedStack.Sink,
             State = this._rememberedStack.State
         };
         this._stack = stack;
         this._rememberedStack = this._rememberedStack.PrevStack;
     }
 }
예제 #12
0
        } // Store

        // Reverses remebered stack so that return message may be dispatched.
        private void FlipRememberedStack()
        {
            if (_stack != null)
            {
                throw new RemotingException(
                          Environment.GetResourceString(
                              "Remoting_Channel_CantCallFRSWhenStackEmtpy"));
            }

            while (_rememberedStack != null)
            {
                SinkStack newStack = new SinkStack();
                newStack.PrevStack = _stack;
                newStack.Sink      = _rememberedStack.Sink;
                newStack.State     = _rememberedStack.State;
                _stack             = newStack;
                _rememberedStack   = _rememberedStack.PrevStack;
            }
        } // FlipRememberedStack
예제 #13
0
        } // Pop

        /// <include file='doc\ChannelSinkStacks.uex' path='docs/doc[@for="ClientChannelSinkStack.AsyncProcessResponse"]/*' />
        public void AsyncProcessResponse(ITransportHeaders headers, Stream stream)
        {
            // If the reply sink is null, this is a one way message, so we're not
            //   going to process the reply path.
            if (_replySink != null)
            {
                if (_stack == null)
                {
                    throw new RemotingException(
                              Environment.GetResourceString(
                                  "Remoting_Channel_CantCallAPRWhenStackEmpty"));
                }

                IClientChannelSink sink  = _stack.Sink;
                Object             state = _stack.State;
                _stack = _stack.PrevStack;

                sink.AsyncProcessResponse(this, state, headers, stream);
            }
        } // AsyncProcessResponse
예제 #14
0
        } // AsyncProcessResponse

        /// <include file='doc\ChannelSinkStacks.uex' path='docs/doc[@for="ServerChannelSinkStack.GetResponseStream"]/*' />
        public Stream GetResponseStream(IMessage msg, ITransportHeaders headers)
        {
            if (_stack == null)
            {
                throw new RemotingException(
                          Environment.GetResourceString(
                              "Remoting_Channel_CantCallGetResponseStreamWhenStackEmpty"));
            }

            // save state
            IServerChannelSink savedSink  = _stack.Sink;
            Object             savedState = _stack.State;

            _stack = _stack.PrevStack;
            Stream stream = savedSink.GetResponseStream(this, savedState, msg, headers);

            // restore state
            Push(savedSink, savedState);

            return(stream);
        } // GetResponseStream
 public object Pop(IClientChannelSink sink)
 {
     if (this._stack == null)
     {
         throw new RemotingException(Environment.GetResourceString("Remoting_Channel_PopOnEmptySinkStack"));
     }
 Label_0018:
     if (this._stack.Sink != sink)
     {
         this._stack = this._stack.PrevStack;
         if (this._stack != null)
         {
             goto Label_0018;
         }
     }
     if (this._stack.Sink == null)
     {
         throw new RemotingException(Environment.GetResourceString("Remoting_Channel_PopFromSinkStackWithoutPush"));
     }
     object state = this._stack.State;
     this._stack = this._stack.PrevStack;
     return state;
 }
        public object Pop(IClientChannelSink sink)
        {
            if (this._stack == null)
            {
                throw new RemotingException(Environment.GetResourceString("Remoting_Channel_PopOnEmptySinkStack"));
            }
Label_0018:
            if (this._stack.Sink != sink)
            {
                this._stack = this._stack.PrevStack;
                if (this._stack != null)
                {
                    goto Label_0018;
                }
            }
            if (this._stack.Sink == null)
            {
                throw new RemotingException(Environment.GetResourceString("Remoting_Channel_PopFromSinkStackWithoutPush"));
            }
            object state = this._stack.State;

            this._stack = this._stack.PrevStack;
            return(state);
        }
예제 #17
0
        } // Store 

        // Reverses remebered stack so that return message may be dispatched. 
        private void FlipRememberedStack()
        {
            if (_stack != null)
                throw new RemotingException( 
                    Environment.GetResourceString(
                        "Remoting_Channel_CantCallFRSWhenStackEmtpy")); 
 
            while (_rememberedStack != null)
            { 
                SinkStack newStack = new SinkStack();
                newStack.PrevStack = _stack;
                newStack.Sink = _rememberedStack.Sink;
                newStack.State = _rememberedStack.State; 
                _stack = newStack;
                _rememberedStack = _rememberedStack.PrevStack; 
            } 
        } // FlipRememberedStack
예제 #18
0
        [System.Security.SecurityCritical]  // auto-generated
        public void Store(IServerChannelSink sink, Object state)
        { 
            if (_stack == null)
            { 
                throw new RemotingException( 
                    Environment.GetResourceString(
                        "Remoting_Channel_StoreOnEmptySinkStack")); 
            }

            // find this sink on the stack
            do 
            {
                if (_stack.Sink == sink) 
                    break; 

                _stack = _stack.PrevStack; 
            } while (_stack != null);

            if (_stack.Sink == null)
            { 
                throw new RemotingException(
                    Environment.GetResourceString("Remoting_Channel_StoreOnSinkStackWithoutPush")); 
            } 

            SinkStack remStack = new SinkStack(); 
            remStack.PrevStack = _rememberedStack;
            remStack.Sink = sink;
            remStack.State = state;
            _rememberedStack = remStack; 

            Pop(sink); 
        } // Store 
예제 #19
0
        public Object Pop(IServerChannelSink sink)
        { 
            if (_stack == null)
            {
                throw new RemotingException(
                    Environment.GetResourceString("Remoting_Channel_PopOnEmptySinkStack")); 
            }
 
            // find this sink on the stack 
            do
            { 
                if (_stack.Sink == sink)
                    break;

                _stack = _stack.PrevStack; 
            } while (_stack != null);
 
            if (_stack.Sink == null) 
            {
                throw new RemotingException( 
                    Environment.GetResourceString("Remoting_Channel_PopFromSinkStackWithoutPush"));
            }

            Object state = _stack.State; 
            _stack = _stack.PrevStack;
 
            return state; 
        } // Pop
예제 #20
0
        [System.Security.SecurityCritical]  // auto-generated
        public void AsyncProcessResponse(ITransportHeaders headers, Stream stream)
        {
            // If the reply sink is null, this is a one way message, so we're not 
            //   going to process the reply path.
            if (_replySink != null) 
            { 
                if (_stack == null)
                { 
                    throw new RemotingException(
                        Environment.GetResourceString(
                            "Remoting_Channel_CantCallAPRWhenStackEmpty"));
                } 

                IClientChannelSink sink = _stack.Sink; 
                Object state = _stack.State; 
                _stack = _stack.PrevStack;
 
                sink.AsyncProcessResponse(this, state, headers, stream);
            }
        } // AsyncProcessResponse
 public void Push(IClientChannelSink sink, object state)
 {
     SinkStack stack = new SinkStack {
         PrevStack = this._stack,
         Sink = sink,
         State = state
     };
     this._stack = stack;
 }
예제 #22
0
        [System.Security.SecurityCritical]  // auto-generated
        public Stream GetResponseStream(IMessage msg, ITransportHeaders headers)
        { 
            if (_stack == null)
            { 
                throw new RemotingException( 
                    Environment.GetResourceString(
                        "Remoting_Channel_CantCallGetResponseStreamWhenStackEmpty")); 
            }

            // save state
            IServerChannelSink savedSink = _stack.Sink; 
            Object savedState = _stack.State;
 
            _stack = _stack.PrevStack; 
            Stream stream = savedSink.GetResponseStream(this, savedState, msg, headers);
 
            // restore state
            Push(savedSink, savedState);

            return stream; 
        } // GetResponseStream
예제 #23
0
 public void Push(IClientChannelSink sink, Object state) 
 {
     SinkStack newStack = new SinkStack(); 
     newStack.PrevStack = _stack; 
     newStack.Sink = sink;
     newStack.State = state; 
     _stack = newStack;
 } // Push
 public void Store(IServerChannelSink sink, object state)
 {
     if (this._stack == null)
     {
         throw new RemotingException(Environment.GetResourceString("Remoting_Channel_StoreOnEmptySinkStack"));
     }
 Label_0018:
     if (this._stack.Sink != sink)
     {
         this._stack = this._stack.PrevStack;
         if (this._stack != null)
         {
             goto Label_0018;
         }
     }
     if (this._stack.Sink == null)
     {
         throw new RemotingException(Environment.GetResourceString("Remoting_Channel_StoreOnSinkStackWithoutPush"));
     }
     SinkStack stack = new SinkStack {
         PrevStack = this._rememberedStack,
         Sink = sink,
         State = state
     };
     this._rememberedStack = stack;
     this.Pop(sink);
 }