Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- DataColumnCollection.cs
- NativeMethods.cs
- SmiMetaDataProperty.cs
- DbConnectionPoolGroup.cs
- MetaDataInfo.cs
- SqlInternalConnectionSmi.cs
- SizeConverter.cs
- Baml2006KeyRecord.cs
- DoubleLinkList.cs
- DirtyTextRange.cs
- DoubleAnimationBase.cs
- NonVisualControlAttribute.cs
- CrossAppDomainChannel.cs
- ProjectionCamera.cs
- XmlnsCompatibleWithAttribute.cs
- SynchronizedDispatch.cs
- PreservationFileReader.cs
- SqlUserDefinedTypeAttribute.cs
- DetailsViewCommandEventArgs.cs
- GeneratedContractType.cs
- ServiceNotStartedException.cs
- DateTimeConstantAttribute.cs
- SHA256.cs
- ProcessProtocolHandler.cs
- WindowsListBox.cs
- XslTransform.cs
- ToolStripGripRenderEventArgs.cs
- AddInPipelineAttributes.cs
- EntityDataSourceDesigner.cs
- SafeFindHandle.cs
- AnchoredBlock.cs
- COM2Enum.cs
- StyleXamlTreeBuilder.cs
- StorageComplexPropertyMapping.cs
- followingquery.cs
- OwnerDrawPropertyBag.cs
- XPathNavigator.cs
- TypeBuilderInstantiation.cs
- DataGridColumnDropSeparator.cs
- DirectoryObjectSecurity.cs
- Visual3D.cs
- CalendarAutomationPeer.cs
- PeerContact.cs
- CodeCatchClause.cs
- odbcmetadatacolumnnames.cs
- X509ThumbprintKeyIdentifierClause.cs
- SoapSchemaImporter.cs
- MenuItemCollection.cs
- Rect.cs
- TransformerInfoCollection.cs
- CodeThrowExceptionStatement.cs
- EditorPart.cs
- HyperLinkField.cs
- XmlReaderSettings.cs
- AttributeCollection.cs
- GenerateTemporaryTargetAssembly.cs
- HatchBrush.cs
- ToolboxBitmapAttribute.cs
- ImageInfo.cs
- FontInfo.cs
- TabRenderer.cs
- MultiPageTextView.cs
- RoleManagerSection.cs
- OLEDB_Util.cs
- GridViewUpdateEventArgs.cs
- GenerateScriptTypeAttribute.cs
- SerTrace.cs
- LoadGrammarCompletedEventArgs.cs
- MembershipSection.cs
- QueryExpr.cs
- DbMetaDataFactory.cs
- HtmlWindow.cs
- TraversalRequest.cs
- ToolStripContentPanel.cs
- ImageSource.cs
- FixUp.cs
- PersianCalendar.cs
- AspNetSynchronizationContext.cs
- DetailsViewInsertedEventArgs.cs
- SystemResources.cs
- PublishLicense.cs
- TagPrefixAttribute.cs
- infer.cs
- SQLInt16Storage.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ConnectionPointGlyph.cs
- JoinCqlBlock.cs
- OrderedDictionary.cs
- NativeObjectSecurity.cs
- ComboBoxAutomationPeer.cs
- WorkflowCommandExtensionItem.cs
- SchemaCollectionPreprocessor.cs
- Matrix3DValueSerializer.cs
- CompiledAction.cs
- SqlDependencyListener.cs
- CounterCreationDataCollection.cs
- CompositeKey.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- Sentence.cs
- cache.cs