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
- ScriptDescriptor.cs
- QilVisitor.cs
- DisplayMemberTemplateSelector.cs
- WebErrorHandler.cs
- DesigntimeLicenseContext.cs
- BufferAllocator.cs
- GC.cs
- Trace.cs
- MasterPage.cs
- Floater.cs
- PartitionedDataSource.cs
- ButtonAutomationPeer.cs
- DateTimeOffsetStorage.cs
- ServiceReference.cs
- ScopeElementCollection.cs
- StyleHelper.cs
- MultipleViewPattern.cs
- GridView.cs
- XmlAttribute.cs
- SurrogateDataContract.cs
- _BasicClient.cs
- UshortList2.cs
- Model3DCollection.cs
- CancellationState.cs
- Ray3DHitTestResult.cs
- AnnotationComponentChooser.cs
- EntityDataSourceView.cs
- FSWPathEditor.cs
- EpmContentDeSerializer.cs
- UriTemplateTable.cs
- ToolStripDropTargetManager.cs
- StrongNameUtility.cs
- COM2PropertyBuilderUITypeEditor.cs
- DataServiceRequestArgs.cs
- PointLightBase.cs
- ValueSerializerAttribute.cs
- TranslateTransform.cs
- MDIControlStrip.cs
- APCustomTypeDescriptor.cs
- RedistVersionInfo.cs
- PropertyChangedEventArgs.cs
- QueryAccessibilityHelpEvent.cs
- PropertyCollection.cs
- ParameterElement.cs
- _HTTPDateParse.cs
- NullableFloatAverageAggregationOperator.cs
- HashRepartitionStream.cs
- UnmanagedHandle.cs
- SimpleMailWebEventProvider.cs
- PageCatalogPart.cs
- OdbcConnectionFactory.cs
- TableChangeProcessor.cs
- RadioButtonList.cs
- Native.cs
- MenuAdapter.cs
- PageAdapter.cs
- DataKey.cs
- codemethodreferenceexpression.cs
- CodeGenerator.cs
- WindowHelperService.cs
- BufferAllocator.cs
- BufferBuilder.cs
- EditorBrowsableAttribute.cs
- FormsAuthenticationEventArgs.cs
- AssemblyAssociatedContentFileAttribute.cs
- SafeLibraryHandle.cs
- validation.cs
- XsdValidatingReader.cs
- WorkflowServiceAttributesTypeConverter.cs
- InvalidFilterCriteriaException.cs
- DataBoundControlAdapter.cs
- ToolStripLocationCancelEventArgs.cs
- LinqDataSourceSelectEventArgs.cs
- FileLevelControlBuilderAttribute.cs
- TypeForwardedFromAttribute.cs
- ConfigUtil.cs
- RefExpr.cs
- TextServicesCompartmentEventSink.cs
- IFlowDocumentViewer.cs
- SortExpressionBuilder.cs
- ClassDataContract.cs
- EtwTrace.cs
- Logging.cs
- UInt32.cs
- StdRegProviderWrapper.cs
- ToolStripOverflow.cs
- OleDbDataAdapter.cs
- TextServicesDisplayAttributePropertyRanges.cs
- DoubleCollectionValueSerializer.cs
- XmlSchemaCollection.cs
- SurrogateSelector.cs
- ExpressionQuoter.cs
- EntityDesignerDataSourceView.cs
- Variant.cs
- SQLDateTime.cs
- ToolStrip.cs
- ListMarkerLine.cs
- Item.cs
- DeploymentSection.cs
- QilCloneVisitor.cs