Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / Remoting / DispatchChannelSink.cs / 1305376 / 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; using System.Diagnostics.Contracts; namespace System.Runtime.Remoting.Channels { internal class DispatchChannelSinkProvider : IServerChannelSinkProvider { internal DispatchChannelSinkProvider() { } // DispatchChannelSinkProvider [System.Security.SecurityCritical] // auto-generated public void GetChannelData(IChannelDataStore channelData) { } [System.Security.SecurityCritical] // auto-generated public IServerChannelSink CreateSink(IChannelReceiver channel) { return new DispatchChannelSink(); } public IServerChannelSinkProvider Next { [System.Security.SecurityCritical] // auto-generated get { return null; } [System.Security.SecurityCritical] // auto-generated set { throw new NotSupportedException(); } } } // class DispatchChannelSinkProvider internal class DispatchChannelSink : IServerChannelSink { internal DispatchChannelSink() { } // DispatchChannelSink [System.Security.SecurityCritical] // auto-generated 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")); } Contract.EndContractBlock(); // 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 [System.Security.SecurityCritical] // auto-generated 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 [System.Security.SecurityCritical] // auto-generated 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 { [System.Security.SecurityCritical] // auto-generated get { return null; } } public IDictionary Properties { [System.Security.SecurityCritical] // auto-generated 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; using System.Diagnostics.Contracts; namespace System.Runtime.Remoting.Channels { internal class DispatchChannelSinkProvider : IServerChannelSinkProvider { internal DispatchChannelSinkProvider() { } // DispatchChannelSinkProvider [System.Security.SecurityCritical] // auto-generated public void GetChannelData(IChannelDataStore channelData) { } [System.Security.SecurityCritical] // auto-generated public IServerChannelSink CreateSink(IChannelReceiver channel) { return new DispatchChannelSink(); } public IServerChannelSinkProvider Next { [System.Security.SecurityCritical] // auto-generated get { return null; } [System.Security.SecurityCritical] // auto-generated set { throw new NotSupportedException(); } } } // class DispatchChannelSinkProvider internal class DispatchChannelSink : IServerChannelSink { internal DispatchChannelSink() { } // DispatchChannelSink [System.Security.SecurityCritical] // auto-generated 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")); } Contract.EndContractBlock(); // 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 [System.Security.SecurityCritical] // auto-generated 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 [System.Security.SecurityCritical] // auto-generated 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 { [System.Security.SecurityCritical] // auto-generated get { return null; } } public IDictionary Properties { [System.Security.SecurityCritical] // auto-generated 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
- SimpleWorkerRequest.cs
- TextWriterTraceListener.cs
- AutoResetEvent.cs
- Decorator.cs
- mediaeventshelper.cs
- TextEffect.cs
- XslTransform.cs
- RtfToXamlLexer.cs
- DataSourceCacheDurationConverter.cs
- Viewport3DVisual.cs
- GatewayDefinition.cs
- StructuralType.cs
- LinkLabelLinkClickedEvent.cs
- RowParagraph.cs
- BitmapEffectOutputConnector.cs
- WebSysDescriptionAttribute.cs
- XmlCollation.cs
- FileUtil.cs
- ListSourceHelper.cs
- MimeFormatter.cs
- ProgressBar.cs
- Html32TextWriter.cs
- SafeLibraryHandle.cs
- Stack.cs
- StylusPointPropertyInfoDefaults.cs
- ProcessDesigner.cs
- DynamicPropertyReader.cs
- SqlRetyper.cs
- Enumerable.cs
- EntryWrittenEventArgs.cs
- DataTableMappingCollection.cs
- ObsoleteAttribute.cs
- MethodAccessException.cs
- CommandPlan.cs
- DefaultValueAttribute.cs
- MULTI_QI.cs
- Action.cs
- CookieHandler.cs
- PhysicalOps.cs
- GZipStream.cs
- DataRecordInfo.cs
- CallbackValidatorAttribute.cs
- HttpModuleCollection.cs
- QueryContinueDragEventArgs.cs
- RelationshipEndMember.cs
- XmlSchemaAll.cs
- SelectedDatesCollection.cs
- LogRecordSequence.cs
- DrawListViewSubItemEventArgs.cs
- PerformanceCounter.cs
- SystemResources.cs
- KeyToListMap.cs
- HttpFileCollectionWrapper.cs
- ArgumentDesigner.xaml.cs
- TabRenderer.cs
- HwndStylusInputProvider.cs
- DeploymentExceptionMapper.cs
- mediaeventshelper.cs
- DbgUtil.cs
- ISCIIEncoding.cs
- ArrangedElementCollection.cs
- ToolboxItem.cs
- _AcceptOverlappedAsyncResult.cs
- DoubleStorage.cs
- PackageDigitalSignatureManager.cs
- SpellerStatusTable.cs
- VisualTarget.cs
- WriteTimeStream.cs
- ImageUrlEditor.cs
- GZipDecoder.cs
- MDIControlStrip.cs
- XmlToDatasetMap.cs
- ValidatorCompatibilityHelper.cs
- XmlSerializerObjectSerializer.cs
- NamespaceTable.cs
- LinkClickEvent.cs
- AudienceUriMode.cs
- ToolTip.cs
- ToolStripPanel.cs
- CompilerErrorCollection.cs
- ping.cs
- HttpListenerRequest.cs
- Nullable.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- DataKey.cs
- EncodingDataItem.cs
- RangeBaseAutomationPeer.cs
- XmlSchemaProviderAttribute.cs
- DataControlFieldsEditor.cs
- LinearKeyFrames.cs
- PassportIdentity.cs
- QuaternionAnimationBase.cs
- TextEndOfLine.cs
- ProtocolImporter.cs
- ObjectDataSourceDisposingEventArgs.cs
- SelectingProviderEventArgs.cs
- AttachmentCollection.cs
- TextTreeExtractElementUndoUnit.cs
- DBConnectionString.cs
- OledbConnectionStringbuilder.cs