Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- JsonByteArrayDataContract.cs
- MetadataArtifactLoaderFile.cs
- BindingsCollection.cs
- PrintDialog.cs
- EntityDataSourceChangingEventArgs.cs
- UITypeEditor.cs
- CounterSample.cs
- IgnoreFlushAndCloseStream.cs
- Configuration.cs
- Metadata.cs
- SAPIEngineTypes.cs
- Clause.cs
- ProcessInfo.cs
- Color.cs
- SmtpSection.cs
- SystemNetworkInterface.cs
- Compiler.cs
- embossbitmapeffect.cs
- ByteStreamGeometryContext.cs
- AttributedMetaModel.cs
- DiscreteKeyFrames.cs
- ValidationErrorCollection.cs
- ProcessThread.cs
- X509Extension.cs
- DesignerContextDescriptor.cs
- SqlEnums.cs
- ControlCollection.cs
- EntityContainer.cs
- FormViewCommandEventArgs.cs
- EventToken.cs
- HybridObjectCache.cs
- CacheHelper.cs
- MexServiceChannelBuilder.cs
- DescriptionAttribute.cs
- ServiceModelConfigurationElementCollection.cs
- UnknownWrapper.cs
- DocumentSchemaValidator.cs
- TrackingProfileCache.cs
- DrawListViewSubItemEventArgs.cs
- WorkflowServiceAttributesTypeConverter.cs
- DeclaredTypeElementCollection.cs
- EntityDataSourceWrapperCollection.cs
- PropertyGridView.cs
- SettingsBindableAttribute.cs
- Command.cs
- SymLanguageVendor.cs
- DrawingGroupDrawingContext.cs
- WebControlAdapter.cs
- SoapSchemaMember.cs
- GroupItemAutomationPeer.cs
- SecuritySessionSecurityTokenProvider.cs
- RegularExpressionValidator.cs
- LinkConverter.cs
- CollectionDataContract.cs
- XmlSchemaComplexContentExtension.cs
- DataControlFieldCell.cs
- BamlResourceContent.cs
- DbConnectionClosed.cs
- CodeTypeParameterCollection.cs
- TextBoxDesigner.cs
- FieldNameLookup.cs
- ContractsBCL.cs
- ScrollChrome.cs
- OutputBuffer.cs
- KeyedByTypeCollection.cs
- TimeoutConverter.cs
- GroupItem.cs
- GregorianCalendar.cs
- TypeExtension.cs
- ActivityMarkupSerializer.cs
- SmtpClient.cs
- SizeAnimation.cs
- CompositeDesignerAccessibleObject.cs
- DbParameterCollectionHelper.cs
- SqlDataSourceDesigner.cs
- ThrowHelper.cs
- InvalidCommandTreeException.cs
- Rfc2898DeriveBytes.cs
- ErrorTableItemStyle.cs
- ContextQuery.cs
- DataGridTable.cs
- DecimalKeyFrameCollection.cs
- InputGestureCollection.cs
- RequestTimeoutManager.cs
- XmlSchemaSimpleTypeUnion.cs
- _TransmitFileOverlappedAsyncResult.cs
- Point3DAnimationBase.cs
- TextBoxBase.cs
- MatrixConverter.cs
- OperationFormatUse.cs
- IndexerNameAttribute.cs
- WebBrowserNavigatingEventHandler.cs
- BitmapEffectGroup.cs
- ChannelTerminatedException.cs
- ReachBasicContext.cs
- TransformerInfoCollection.cs
- HttpFileCollection.cs
- MimeFormImporter.cs
- MarkupWriter.cs
- SqlError.cs