Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / clr / src / BCL / System / Runtime / Remoting / DispatchChannelSink.cs / 1 / DispatchChannelSink.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // File: DispatchChannelSink.cs using System; using System.Collections; using System.IO; using System.Runtime.Remoting; using System.Runtime.Remoting.Messaging; namespace System.Runtime.Remoting.Channels { internal class DispatchChannelSinkProvider : IServerChannelSinkProvider { internal DispatchChannelSinkProvider() { } // DispatchChannelSinkProvider public void GetChannelData(IChannelDataStore channelData) { } public IServerChannelSink CreateSink(IChannelReceiver channel) { return new DispatchChannelSink(); } public IServerChannelSinkProvider Next { get { return null; } set { throw new NotSupportedException(); } } } // class DispatchChannelSinkProvider internal class DispatchChannelSink : IServerChannelSink { internal DispatchChannelSink() { } // DispatchChannelSink public ServerProcessing ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, out IMessage responseMsg, out ITransportHeaders responseHeaders, out Stream responseStream) { if (requestMsg == null) { throw new ArgumentNullException( "requestMsg", Environment.GetResourceString("Remoting_Channel_DispatchSinkMessageMissing")); } // check arguments if (requestStream != null) { throw new RemotingException( Environment.GetResourceString("Remoting_Channel_DispatchSinkWantsNullRequestStream")); } responseHeaders = null; responseStream = null; return ChannelServices.DispatchMessage(sinkStack, requestMsg, out responseMsg); } // ProcessMessage public void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack, Object state, IMessage msg, ITransportHeaders headers, Stream stream) { // We never push ourselves to the sink stack, so this won't be called. throw new NotSupportedException(); } // AsyncProcessResponse public Stream GetResponseStream(IServerResponseChannelSinkStack sinkStack, Object state, IMessage msg, ITransportHeaders headers) { // We never push ourselves to the sink stack, so this won't be called. throw new NotSupportedException(); } // GetResponseStream public IServerChannelSink NextChannelSink { get { return null; } } public IDictionary Properties { get { return null; } } } // class DispatchChannelSink } // namespace System.Runtime.Remoting.Channels // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // File: DispatchChannelSink.cs using System; using System.Collections; using System.IO; using System.Runtime.Remoting; using System.Runtime.Remoting.Messaging; namespace System.Runtime.Remoting.Channels { internal class DispatchChannelSinkProvider : IServerChannelSinkProvider { internal DispatchChannelSinkProvider() { } // DispatchChannelSinkProvider public void GetChannelData(IChannelDataStore channelData) { } public IServerChannelSink CreateSink(IChannelReceiver channel) { return new DispatchChannelSink(); } public IServerChannelSinkProvider Next { get { return null; } set { throw new NotSupportedException(); } } } // class DispatchChannelSinkProvider internal class DispatchChannelSink : IServerChannelSink { internal DispatchChannelSink() { } // DispatchChannelSink public ServerProcessing ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, out IMessage responseMsg, out ITransportHeaders responseHeaders, out Stream responseStream) { if (requestMsg == null) { throw new ArgumentNullException( "requestMsg", Environment.GetResourceString("Remoting_Channel_DispatchSinkMessageMissing")); } // check arguments if (requestStream != null) { throw new RemotingException( Environment.GetResourceString("Remoting_Channel_DispatchSinkWantsNullRequestStream")); } responseHeaders = null; responseStream = null; return ChannelServices.DispatchMessage(sinkStack, requestMsg, out responseMsg); } // ProcessMessage public void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack, Object state, IMessage msg, ITransportHeaders headers, Stream stream) { // We never push ourselves to the sink stack, so this won't be called. throw new NotSupportedException(); } // AsyncProcessResponse public Stream GetResponseStream(IServerResponseChannelSinkStack sinkStack, Object state, IMessage msg, ITransportHeaders headers) { // We never push ourselves to the sink stack, so this won't be called. throw new NotSupportedException(); } // GetResponseStream public IServerChannelSink NextChannelSink { get { return null; } } public IDictionary Properties { get { return null; } } } // class DispatchChannelSink } // namespace System.Runtime.Remoting.Channels // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BamlTreeUpdater.cs
- FileInfo.cs
- NetTcpBinding.cs
- StatusBarPanelClickEvent.cs
- BaseCodePageEncoding.cs
- TraceContextEventArgs.cs
- CheckedPointers.cs
- QueueProcessor.cs
- ImplicitInputBrush.cs
- KeyInstance.cs
- ToolStripItemGlyph.cs
- GraphicsState.cs
- LayoutTableCell.cs
- HMAC.cs
- ModuleConfigurationInfo.cs
- TextWriter.cs
- TransformedBitmap.cs
- SqlDataSourceView.cs
- GridProviderWrapper.cs
- NegationPusher.cs
- TreeNodeMouseHoverEvent.cs
- XsltSettings.cs
- StrokeCollectionDefaultValueFactory.cs
- OLEDB_Enum.cs
- followingquery.cs
- RuleSetDialog.cs
- MultiPageTextView.cs
- WindowsGraphics2.cs
- StringUtil.cs
- MetafileHeader.cs
- EntityViewGenerator.cs
- WaitHandleCannotBeOpenedException.cs
- Evaluator.cs
- SessionParameter.cs
- CompensationDesigner.cs
- WebPartCancelEventArgs.cs
- DescendentsWalker.cs
- GestureRecognitionResult.cs
- DbgUtil.cs
- TextTreeText.cs
- ToolBarButtonClickEvent.cs
- TextSelectionHelper.cs
- MenuEventArgs.cs
- CodeObject.cs
- MetadataFile.cs
- BindingUtils.cs
- odbcmetadatafactory.cs
- IdentifierService.cs
- DispatchRuntime.cs
- ComponentDispatcherThread.cs
- ObjectSpanRewriter.cs
- OleServicesContext.cs
- FirewallWrapper.cs
- StaticContext.cs
- FtpCachePolicyElement.cs
- MessageDecoder.cs
- Rotation3D.cs
- TextWriter.cs
- DesignerTransactionCloseEvent.cs
- PngBitmapDecoder.cs
- Stylus.cs
- TableLayoutSettingsTypeConverter.cs
- StringHandle.cs
- figurelength.cs
- FigureHelper.cs
- ApplicationTrust.cs
- MaterialGroup.cs
- EntityDataSourceChangedEventArgs.cs
- SafeHandles.cs
- XmlDataProvider.cs
- GiveFeedbackEventArgs.cs
- CodeExporter.cs
- TdsValueSetter.cs
- CaseExpr.cs
- FontStretches.cs
- ImageCodecInfo.cs
- Content.cs
- TCPListener.cs
- WebBrowsableAttribute.cs
- ViewGenerator.cs
- GridViewRowEventArgs.cs
- JoinCqlBlock.cs
- CurrencyWrapper.cs
- UnicastIPAddressInformationCollection.cs
- TraceContextRecord.cs
- PostBackOptions.cs
- XmlSchemaDatatype.cs
- WrappedIUnknown.cs
- ObjectAnimationUsingKeyFrames.cs
- FixedLineResult.cs
- MasterPageCodeDomTreeGenerator.cs
- OpenFileDialog.cs
- SmiContextFactory.cs
- DateTimeOffsetConverter.cs
- InputLangChangeRequestEvent.cs
- XamlPoint3DCollectionSerializer.cs
- CompilerScopeManager.cs
- ReadOnlyActivityGlyph.cs
- EntityDataSourceContextCreatedEventArgs.cs
- CollectionChangeEventArgs.cs