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
- CounterSampleCalculator.cs
- CodeMemberProperty.cs
- DBParameter.cs
- ACL.cs
- coordinatorscratchpad.cs
- GZipDecoder.cs
- NetStream.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- FileDataSourceCache.cs
- DiagnosticSection.cs
- FixedPageStructure.cs
- IList.cs
- ConfigXmlElement.cs
- ByteBufferPool.cs
- ReflectionUtil.cs
- DbReferenceCollection.cs
- Vector3D.cs
- ZoneIdentityPermission.cs
- DCSafeHandle.cs
- BlobPersonalizationState.cs
- CounterCreationDataCollection.cs
- SettingsSection.cs
- ConfigurationManagerInternalFactory.cs
- BulletedListEventArgs.cs
- PeerName.cs
- RepeatInfo.cs
- CompositeScriptReference.cs
- PeerTransportBindingElement.cs
- PerfCounters.cs
- ValueChangedEventManager.cs
- XmlChildNodes.cs
- XmlSerializationGeneratedCode.cs
- Util.cs
- SystemResourceKey.cs
- SoapTransportImporter.cs
- VScrollProperties.cs
- Point4DValueSerializer.cs
- RectAnimationClockResource.cs
- __FastResourceComparer.cs
- WindowPatternIdentifiers.cs
- FreeFormDesigner.cs
- XmlValidatingReaderImpl.cs
- ResourceLoader.cs
- SchemaAttDef.cs
- OracleParameterBinding.cs
- XmlException.cs
- Decoder.cs
- TripleDES.cs
- FlowDocumentPaginator.cs
- ServiceOperationWrapper.cs
- Control.cs
- IDReferencePropertyAttribute.cs
- FolderBrowserDialog.cs
- ListDictionaryInternal.cs
- PerspectiveCamera.cs
- Util.cs
- SiteOfOriginContainer.cs
- DataGridPageChangedEventArgs.cs
- AnnotationService.cs
- FileVersionInfo.cs
- ConfigurationSchemaErrors.cs
- UniqueIdentifierService.cs
- SkinIDTypeConverter.cs
- DataGridViewColumnCollectionEditor.cs
- WizardForm.cs
- SerializationInfoEnumerator.cs
- BindingWorker.cs
- ConfigXmlDocument.cs
- Instrumentation.cs
- NumericPagerField.cs
- WrapPanel.cs
- SerializerDescriptor.cs
- MimeObjectFactory.cs
- SpeakCompletedEventArgs.cs
- Encoder.cs
- DoubleAverageAggregationOperator.cs
- SettingsBase.cs
- Funcletizer.cs
- RelationalExpressions.cs
- Condition.cs
- TableChangeProcessor.cs
- NegatedConstant.cs
- SizeKeyFrameCollection.cs
- __TransparentProxy.cs
- ClientData.cs
- ParameterCollectionEditor.cs
- TextEditorThreadLocalStore.cs
- MultipleViewPattern.cs
- TcpChannelListener.cs
- AsymmetricAlgorithm.cs
- ImageBrush.cs
- DispatcherExceptionEventArgs.cs
- TemplatePartAttribute.cs
- WaitingCursor.cs
- XmlSchemaComplexContent.cs
- SemaphoreFullException.cs
- XmlSchemaSubstitutionGroup.cs
- View.cs
- DefinitionBase.cs
- DbConnectionPoolIdentity.cs