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
- ColumnReorderedEventArgs.cs
- ResXDataNode.cs
- DataQuery.cs
- CorePropertiesFilter.cs
- UpdateCompiler.cs
- CommandSet.cs
- Hex.cs
- CompleteWizardStep.cs
- Membership.cs
- KeySplineConverter.cs
- CollectionConverter.cs
- GridViewDeletedEventArgs.cs
- EntityDesignerBuildProvider.cs
- TreeViewCancelEvent.cs
- BooleanConverter.cs
- MemberDescriptor.cs
- sqlinternaltransaction.cs
- TreeNodeSelectionProcessor.cs
- SchemaCreator.cs
- ToolboxItemAttribute.cs
- FileInfo.cs
- Typography.cs
- PropertySegmentSerializer.cs
- SplitterPanelDesigner.cs
- DataPagerField.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- PageContent.cs
- DatatypeImplementation.cs
- DiscoveryMessageSequenceCD1.cs
- ExecutionContext.cs
- EngineSiteSapi.cs
- SiteMapNodeCollection.cs
- Compiler.cs
- TypeDependencyAttribute.cs
- SemanticResultValue.cs
- SiteMapPathDesigner.cs
- DependencyObjectProvider.cs
- ReachFixedPageSerializer.cs
- ExpressionConverter.cs
- SQLDateTime.cs
- SafeNativeMethods.cs
- XmlILStorageConverter.cs
- TransformerInfoCollection.cs
- PagesChangedEventArgs.cs
- DispatcherSynchronizationContext.cs
- OracleTimeSpan.cs
- InfoCardSymmetricCrypto.cs
- TemplateParser.cs
- BamlLocalizableResource.cs
- CLRBindingWorker.cs
- InvalidDataException.cs
- MissingSatelliteAssemblyException.cs
- SequenceFullException.cs
- Switch.cs
- BrushMappingModeValidation.cs
- AbandonedMutexException.cs
- RtType.cs
- GeneralTransform3DTo2DTo3D.cs
- PointLight.cs
- TraceHwndHost.cs
- HebrewCalendar.cs
- Pkcs9Attribute.cs
- PreparingEnlistment.cs
- PartialCachingControl.cs
- ToolStripDropDownClosingEventArgs.cs
- DataSetMappper.cs
- _ContextAwareResult.cs
- TreeNodeCollection.cs
- ScrollProperties.cs
- TabletDeviceInfo.cs
- Stopwatch.cs
- ProbeMatches11.cs
- ObjectFullSpanRewriter.cs
- WorkflowMarkupSerializationException.cs
- X509SecurityTokenProvider.cs
- EndpointAddressMessageFilter.cs
- HtmlControlAdapter.cs
- ErrorInfoXmlDocument.cs
- TransformProviderWrapper.cs
- WindowsListViewSubItem.cs
- OleDbParameterCollection.cs
- SerializationSectionGroup.cs
- BamlBinaryWriter.cs
- WebServiceAttribute.cs
- HtmlTableCellCollection.cs
- SiteMap.cs
- QilChoice.cs
- SharedPersonalizationStateInfo.cs
- Roles.cs
- EntitySetBase.cs
- EventWaitHandle.cs
- DataListCommandEventArgs.cs
- ControlAdapter.cs
- GeneralTransform3DCollection.cs
- IdentityNotMappedException.cs
- IconConverter.cs
- WebPartsPersonalizationAuthorization.cs
- AuthenticationSection.cs
- SqlTrackingWorkflowInstance.cs
- FieldBuilder.cs