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
- NullableBoolConverter.cs
- PeerNameRecord.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- InstalledFontCollection.cs
- SessionStateModule.cs
- IPEndPointCollection.cs
- ImageList.cs
- DynamicDataManager.cs
- COAUTHIDENTITY.cs
- TableParagraph.cs
- SqlBuilder.cs
- NamespaceEmitter.cs
- WorkflowServiceHost.cs
- TypeLibConverter.cs
- BinaryObjectReader.cs
- Soap.cs
- TextElementEditingBehaviorAttribute.cs
- SqlNamer.cs
- CompleteWizardStep.cs
- DodSequenceMerge.cs
- UTF32Encoding.cs
- ControlCollection.cs
- ElementUtil.cs
- GregorianCalendar.cs
- SecurityManager.cs
- ItemCollection.cs
- PolyLineSegment.cs
- FaultBookmark.cs
- MsmqInputChannelListenerBase.cs
- KeyboardNavigation.cs
- EventManager.cs
- DescendantQuery.cs
- PrintPreviewDialog.cs
- TraversalRequest.cs
- RIPEMD160Managed.cs
- SimpleColumnProvider.cs
- FrameworkTextComposition.cs
- ModuleBuilder.cs
- MemoryMappedViewAccessor.cs
- InternalConfigRoot.cs
- ConnectionManagementElementCollection.cs
- WorkflowViewManager.cs
- ZipIOExtraFieldZip64Element.cs
- AccessViolationException.cs
- ControlBindingsCollection.cs
- ImportCatalogPart.cs
- RequestQueue.cs
- SmtpReplyReader.cs
- MergeFailedEvent.cs
- XmlIncludeAttribute.cs
- PropertyChangingEventArgs.cs
- Container.cs
- DashStyle.cs
- XamlSerializerUtil.cs
- ChameleonKey.cs
- ToolStripSeparatorRenderEventArgs.cs
- DataGridLinkButton.cs
- CachedTypeface.cs
- MdiWindowListStrip.cs
- LockedActivityGlyph.cs
- DiscoveryClientChannelFactory.cs
- JsonFormatReaderGenerator.cs
- ImageIndexConverter.cs
- ChangeProcessor.cs
- PenLineCapValidation.cs
- DataProviderNameConverter.cs
- DataIdProcessor.cs
- SecurityToken.cs
- XmlSchemaImport.cs
- UIElement.cs
- WebPartDisplayModeCancelEventArgs.cs
- HttpValueCollection.cs
- ToolStripSettings.cs
- SessionStateContainer.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- embossbitmapeffect.cs
- StoreItemCollection.Loader.cs
- DBNull.cs
- SqlUtil.cs
- Blend.cs
- ExceptionRoutedEventArgs.cs
- DependencyPropertyHelper.cs
- ApplicationDirectory.cs
- DataServiceQuery.cs
- ToolStripArrowRenderEventArgs.cs
- NamespaceTable.cs
- RMPublishingDialog.cs
- IResourceProvider.cs
- PreviewKeyDownEventArgs.cs
- Char.cs
- CodeGeneratorOptions.cs
- BaseTemplateCodeDomTreeGenerator.cs
- NameValueSectionHandler.cs
- SerializationFieldInfo.cs
- EventSetter.cs
- AdornerDecorator.cs
- Vector3DConverter.cs
- FilteredReadOnlyMetadataCollection.cs
- JavaScriptSerializer.cs
- OneWayBindingElementImporter.cs