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
- IdentifierService.cs
- ScriptHandlerFactory.cs
- SystemIPGlobalProperties.cs
- ImageSourceValueSerializer.cs
- ChannelSinkStacks.cs
- PrimitiveXmlSerializers.cs
- CodeFieldReferenceExpression.cs
- OdbcPermission.cs
- ListViewGroupConverter.cs
- SmtpCommands.cs
- CompositeActivityDesigner.cs
- SystemWebCachingSectionGroup.cs
- CodeGroup.cs
- SqlRowUpdatedEvent.cs
- Baml2006KeyRecord.cs
- WebPartPersonalization.cs
- XPathNodeList.cs
- TraceHandler.cs
- SettingsPropertyNotFoundException.cs
- ConstrainedDataObject.cs
- InvokeProviderWrapper.cs
- TextBox.cs
- NameValueConfigurationElement.cs
- WindowCollection.cs
- ScrollChangedEventArgs.cs
- XmlSchemaIdentityConstraint.cs
- ReaderContextStackData.cs
- TreeNodeEventArgs.cs
- ActiveDocumentEvent.cs
- BitmapEffectRenderDataResource.cs
- TypeLibConverter.cs
- MenuCommand.cs
- BaseComponentEditor.cs
- ProgressPage.cs
- GridViewRow.cs
- DateTimeFormatInfoScanner.cs
- DataGridRow.cs
- DataTableReader.cs
- ObjectRef.cs
- XmlCharType.cs
- WindowsListViewScroll.cs
- DrawingBrush.cs
- WebPartEditorOkVerb.cs
- DefaultSection.cs
- SafeMILHandle.cs
- XmlSchemaException.cs
- Timer.cs
- CompiledELinqQueryState.cs
- SqlGenerator.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- RectValueSerializer.cs
- CharacterBufferReference.cs
- NativeMethods.cs
- InternalSafeNativeMethods.cs
- WebPartActionVerb.cs
- SurrogateSelector.cs
- FormatException.cs
- ToolStripDesignerAvailabilityAttribute.cs
- XPathAncestorIterator.cs
- ResourceReferenceExpression.cs
- WizardPanelChangingEventArgs.cs
- WebPartMenu.cs
- QueryReaderSettings.cs
- PaperSource.cs
- QueryResponse.cs
- DeadCharTextComposition.cs
- NavigationHelper.cs
- ObjectStorage.cs
- TextRangeEditTables.cs
- HashSetDebugView.cs
- InkPresenter.cs
- TextEffectCollection.cs
- WmfPlaceableFileHeader.cs
- LoginNameDesigner.cs
- Property.cs
- ExtenderHelpers.cs
- WebBrowser.cs
- WebServiceMethodData.cs
- WebScriptMetadataFormatter.cs
- ImageCreator.cs
- ViewCellRelation.cs
- ThumbAutomationPeer.cs
- LOSFormatter.cs
- LinqDataSourceSelectEventArgs.cs
- WebBrowserHelper.cs
- SiteMapNode.cs
- LicenseException.cs
- ProcessModule.cs
- Activator.cs
- StringDictionary.cs
- EditingCommands.cs
- Typeface.cs
- ExpressionBuilderCollection.cs
- CharEntityEncoderFallback.cs
- DPTypeDescriptorContext.cs
- StaticDataManager.cs
- SiteMapNodeItemEventArgs.cs
- MenuEventArgs.cs
- RequiredFieldValidator.cs
- ComponentChangedEvent.cs