/// <summary>Requests asynchronous processing of a method call on the sinks in the current sink stack.</summary>
        /// <param name="msg">The message to be serialized onto the requested stream.</param>
        /// <param name="headers">The headers retrieved from the server response stream. </param>
        /// <param name="stream">The stream coming back from the transport sink. </param>
        /// <exception cref="T:System.Runtime.Remoting.RemotingException">The current sink stack is empty. </exception>
        /// <PermissionSet>
        ///   <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
        /// </PermissionSet>
        public void AsyncProcessResponse(IMessage msg, ITransportHeaders headers, Stream stream)
        {
            if (this._sinkStack == null)
            {
                throw new RemotingException("The current sink stack is empty");
            }
            ChanelSinkStackEntry sinkStack = this._sinkStack;

            this._sinkStack = this._sinkStack.Next;
            ((IServerChannelSink)sinkStack.Sink).AsyncProcessResponse(this, sinkStack.State, msg, headers, stream);
        }
		public object Pop (IServerChannelSink sink)
		{
			// Pops until the sink is found

			while (_sinkStack != null)
			{
				ChanelSinkStackEntry stackEntry = _sinkStack;
				_sinkStack = _sinkStack.Next;
				if (stackEntry.Sink == sink) return stackEntry.State;
			}
			throw new RemotingException ("The current sink stack is empty, or the specified sink was never pushed onto the current stack");
		}
예제 #3
0
		public void AsyncProcessResponse (ITransportHeaders headers, Stream stream)
		{
			if (_sinkStack == null) throw new RemotingException ("The current sink stack is empty");

			ChanelSinkStackEntry stackEntry = _sinkStack;
			_sinkStack = _sinkStack.Next;

			((IClientChannelSink)stackEntry.Sink).AsyncProcessResponse (this, stackEntry.State, headers, stream);

			// Do not call AsyncProcessResponse for each sink in the stack.
			// The sink must recursively call IClientChannelSinkStack.AsyncProcessResponse
			// after its own processing
		}
 /// <summary>Pops the information associated with all the sinks from the sink stack up to and including the specified sink.</summary>
 /// <returns>Information generated on the request side and associated with the specified sink.</returns>
 /// <param name="sink">The sink to remove and return from the sink stack. </param>
 /// <exception cref="T:System.Runtime.Remoting.RemotingException">The current sink stack is empty, or the specified sink was never pushed onto the current stack. </exception>
 /// <PermissionSet>
 ///   <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
 /// </PermissionSet>
 public object Pop(IServerChannelSink sink)
 {
     while (this._sinkStack != null)
     {
         ChanelSinkStackEntry sinkStack = this._sinkStack;
         this._sinkStack = this._sinkStack.Next;
         if (sinkStack.Sink == sink)
         {
             return(sinkStack.State);
         }
     }
     throw new RemotingException("The current sink stack is empty, or the specified sink was never pushed onto the current stack");
 }
예제 #5
0
        public object Pop(IServerChannelSink sink)
        {
            // Pops until the sink is found

            while (_sinkStack != null)
            {
                ChanelSinkStackEntry stackEntry = _sinkStack;
                _sinkStack = _sinkStack.Next;
                if (stackEntry.Sink == sink)
                {
                    return(stackEntry.State);
                }
            }
            throw new RemotingException("The current sink stack is empty, or the specified sink was never pushed onto the current stack");
        }
예제 #6
0
        public void AsyncProcessResponse(IMessage msg, ITransportHeaders headers, Stream stream)
        {
            if (_sinkStack == null)
            {
                throw new RemotingException("The current sink stack is empty");
            }

            ChanelSinkStackEntry stackEntry = _sinkStack;

            _sinkStack = _sinkStack.Next;
            ((IServerChannelSink)stackEntry.Sink).AsyncProcessResponse(this, stackEntry.State, msg, headers, stream);

            // Do not call AsyncProcessResponse for each sink in the stack.
            // The sink must recursively call IServerChannelSinkStack.AsyncProcessResponse
            // after its own processing
        }
예제 #7
0
 public ChanelSinkStackEntry(IChannelSinkBase sink, object state, ChanelSinkStackEntry next)
 {
     Sink  = sink;
     State = state;
     Next  = next;
 }
예제 #8
0
 public void Push(IServerChannelSink sink, object state)
 {
     _sinkStack = new ChanelSinkStackEntry(sink, state, _sinkStack);
 }
예제 #9
0
 public ChanelSinkStackEntry(IChannelSinkBase sink, object state, ChanelSinkStackEntry next)
 {
     this.Sink  = sink;
     this.State = state;
     this.Next  = next;
 }
예제 #10
0
		public void Push (IClientChannelSink sink, object state)
		{
			_sinkStack = new ChanelSinkStackEntry (sink, state, _sinkStack);
		}
예제 #11
0
		public ChanelSinkStackEntry(IChannelSinkBase sink, object state, ChanelSinkStackEntry next)
		{
			Sink = sink;
			State = state;
			Next = next;
		}
 /// <summary>Pushes the specified sink and information that is associated with it onto the sink stack.</summary>
 /// <param name="sink">The sink to push onto the sink stack. </param>
 /// <param name="state">Information generated on the request side that is needed on the response side. </param>
 /// <PermissionSet>
 ///   <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
 /// </PermissionSet>
 public void Push(IClientChannelSink sink, object state)
 {
     this._sinkStack = new ChanelSinkStackEntry(sink, state, this._sinkStack);
 }