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
- Quaternion.cs
- CodeFieldReferenceExpression.cs
- ADRole.cs
- ToolStripContentPanel.cs
- Brush.cs
- ToolbarAUtomationPeer.cs
- EnlistmentTraceIdentifier.cs
- SQLByteStorage.cs
- ReadOnlyPropertyMetadata.cs
- SqlBuilder.cs
- NamespaceListProperty.cs
- CustomAttributeFormatException.cs
- ServiceNameElementCollection.cs
- OdbcEnvironment.cs
- PathFigure.cs
- ObjectCloneHelper.cs
- InternalResources.cs
- ConfigurationSectionGroup.cs
- MetadataUtilsSmi.cs
- SystemTcpStatistics.cs
- ECDiffieHellmanCngPublicKey.cs
- SoapHeaderAttribute.cs
- Utils.cs
- SchemeSettingElement.cs
- SHA256.cs
- TextSelectionProcessor.cs
- Soap11ServerProtocol.cs
- ConfigurationConverterBase.cs
- CompiledIdentityConstraint.cs
- shaperfactoryquerycachekey.cs
- Renderer.cs
- Int16KeyFrameCollection.cs
- SingleConverter.cs
- AdapterUtil.cs
- ConfigurationLocation.cs
- DataColumnCollection.cs
- RegistryExceptionHelper.cs
- CountdownEvent.cs
- TransactionFlowElement.cs
- SQLChars.cs
- Binding.cs
- SettingsAttributes.cs
- ZipIOModeEnforcingStream.cs
- EntityCommandDefinition.cs
- Quad.cs
- VectorCollectionConverter.cs
- WebPartEditorApplyVerb.cs
- VisualTreeUtils.cs
- UInt32.cs
- MetadataWorkspace.cs
- DesigntimeLicenseContext.cs
- ResourcePool.cs
- LinqTreeNodeEvaluator.cs
- CacheSection.cs
- ForeignKeyConstraint.cs
- ListBoxDesigner.cs
- X509CertificateChain.cs
- HttpPostLocalhostServerProtocol.cs
- IdentifierElement.cs
- CacheOutputQuery.cs
- ProcessManager.cs
- Tool.cs
- ConnectivityStatus.cs
- PanelStyle.cs
- XPathNodePointer.cs
- XmlSchemaInclude.cs
- XhtmlBasicImageAdapter.cs
- BaseHashHelper.cs
- CodeDefaultValueExpression.cs
- ConfigurationFileMap.cs
- PolyLineSegment.cs
- StagingAreaInputItem.cs
- WinEventTracker.cs
- HyperLinkColumn.cs
- NotCondition.cs
- UpdateRecord.cs
- HtmlElement.cs
- LOSFormatter.cs
- RangeValuePatternIdentifiers.cs
- WebPartConnectionsConfigureVerb.cs
- LocalizableResourceBuilder.cs
- Item.cs
- ToolBarButtonClickEvent.cs
- SafeEventLogWriteHandle.cs
- EntryPointNotFoundException.cs
- QilLoop.cs
- ServiceSecurityAuditBehavior.cs
- WebPart.cs
- HijriCalendar.cs
- EntityDataSourceConfigureObjectContext.cs
- ExeContext.cs
- EnumUnknown.cs
- WorkerProcess.cs
- HtmlCommandAdapter.cs
- KeySplineConverter.cs
- AstTree.cs
- TimeSpanSecondsConverter.cs
- PrintingPermissionAttribute.cs
- ObjectPropertyMapping.cs
- LoginView.cs