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); }
} // 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
} // 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
/// <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); }
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; }
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); }
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; } }
} // 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
} // 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
} // 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); }
} // 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
[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
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
[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
[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
public void Push(IClientChannelSink sink, Object state) { SinkStack newStack = new SinkStack(); newStack.PrevStack = _stack; newStack.Sink = sink; newStack.State = state; _stack = newStack; } // Push