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
- PasswordRecoveryAutoFormat.cs
- ResourceAttributes.cs
- RecognizedWordUnit.cs
- SponsorHelper.cs
- RayHitTestParameters.cs
- EndpointAddressMessageFilter.cs
- ZoneButton.cs
- DbFunctionCommandTree.cs
- CompositionCommandSet.cs
- Handle.cs
- TextServicesProperty.cs
- AssemblyNameProxy.cs
- ElementMarkupObject.cs
- SqlCacheDependencySection.cs
- DefaultSection.cs
- XmlNodeChangedEventArgs.cs
- Timeline.cs
- CodeAttributeArgument.cs
- WebPartVerb.cs
- UrlAuthFailureHandler.cs
- ExpressionLink.cs
- LocalServiceSecuritySettingsElement.cs
- CalendarButtonAutomationPeer.cs
- COSERVERINFO.cs
- FlowDocumentPageViewerAutomationPeer.cs
- Parser.cs
- PlaceHolder.cs
- RenderDataDrawingContext.cs
- FuncTypeConverter.cs
- NativeMethods.cs
- InvokeMethodActivityDesigner.cs
- UniqueIdentifierService.cs
- SchemaNotation.cs
- dbdatarecord.cs
- DefaultExpression.cs
- ScriptingWebServicesSectionGroup.cs
- RectKeyFrameCollection.cs
- DataGridTextBox.cs
- OutArgument.cs
- BinaryObjectInfo.cs
- SecurityCriticalDataForSet.cs
- Converter.cs
- HwndSource.cs
- InputLanguageCollection.cs
- MouseActionValueSerializer.cs
- InputProcessorProfiles.cs
- RegexWriter.cs
- DataMember.cs
- Cell.cs
- ChildTable.cs
- CompiledAction.cs
- Triplet.cs
- SystemNetworkInterface.cs
- ContentOperations.cs
- MultiBinding.cs
- MetafileHeaderWmf.cs
- Component.cs
- Hex.cs
- Permission.cs
- MenuBindingsEditor.cs
- PtsHelper.cs
- EventPropertyMap.cs
- MailMessage.cs
- VisualStyleRenderer.cs
- FreezableDefaultValueFactory.cs
- ViewManager.cs
- NameValueConfigurationCollection.cs
- Authorization.cs
- PreviewPageInfo.cs
- wmiprovider.cs
- PrintingPermissionAttribute.cs
- PrimitiveSchema.cs
- NullRuntimeConfig.cs
- ColorMap.cs
- CheckoutException.cs
- Hash.cs
- LocatorManager.cs
- ConnectionManagementSection.cs
- ScriptMethodAttribute.cs
- CodeGeneratorOptions.cs
- SqlStream.cs
- VirtualDirectoryMappingCollection.cs
- TlsSspiNegotiation.cs
- TextEditorCopyPaste.cs
- ExpressionBindingCollection.cs
- DataGridToolTip.cs
- TextProviderWrapper.cs
- CalendarAutoFormat.cs
- SynchronizationLockException.cs
- ManagementEventArgs.cs
- XmlSchemaElement.cs
- HttpListenerResponse.cs
- DataGridViewComboBoxColumn.cs
- HttpListenerResponse.cs
- RuntimeDelegateArgument.cs
- IApplicationTrustManager.cs
- Function.cs
- mongolianshape.cs
- QueryOutputWriter.cs
- NotifyParentPropertyAttribute.cs