Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- PolyBezierSegment.cs
- PassportAuthentication.cs
- SourceFilter.cs
- ComAdminInterfaces.cs
- SqlDependency.cs
- Overlapped.cs
- ConstructorNeedsTagAttribute.cs
- ControlBuilder.cs
- ListViewItemMouseHoverEvent.cs
- XpsImageSerializationService.cs
- IApplicationTrustManager.cs
- LoadRetryAsyncResult.cs
- TimeoutException.cs
- WebSysDisplayNameAttribute.cs
- Listbox.cs
- SecUtil.cs
- _UriSyntax.cs
- printdlgexmarshaler.cs
- RegexReplacement.cs
- EventRouteFactory.cs
- AnimationClockResource.cs
- ReaderWriterLock.cs
- SymmetricSecurityProtocolFactory.cs
- ParallelTimeline.cs
- XsltConvert.cs
- XmlSchemaComplexContentRestriction.cs
- DbProviderSpecificTypePropertyAttribute.cs
- UnknownWrapper.cs
- Scheduler.cs
- Comparer.cs
- ClientFormsIdentity.cs
- TcpClientChannel.cs
- InvokeBinder.cs
- ImageAnimator.cs
- GlobalEventManager.cs
- Highlights.cs
- selecteditemcollection.cs
- TreeNodeBinding.cs
- XmlDocumentType.cs
- BackStopAuthenticationModule.cs
- DynamicILGenerator.cs
- RenderingEventArgs.cs
- RecordsAffectedEventArgs.cs
- FontInfo.cs
- OutputCacheSection.cs
- TimeSpanParse.cs
- DispatchChannelSink.cs
- HttpCookieCollection.cs
- BasicExpandProvider.cs
- DesignerActionUIStateChangeEventArgs.cs
- FixedSOMElement.cs
- InheritanceRules.cs
- MetadataSerializer.cs
- SqlDataSourceDesigner.cs
- IndexedEnumerable.cs
- SettingsAttributeDictionary.cs
- SqlBulkCopyColumnMappingCollection.cs
- ReadOnlyActivityGlyph.cs
- BitmapFrameEncode.cs
- UrlPath.cs
- SRGSCompiler.cs
- RightsManagementErrorHandler.cs
- RectAnimationBase.cs
- AttributeCollection.cs
- QilGenerator.cs
- LoginDesignerUtil.cs
- XmlSchemaDocumentation.cs
- InputBuffer.cs
- SectionInput.cs
- CodeDelegateInvokeExpression.cs
- DataGridViewColumnHeaderCell.cs
- WindowsGraphicsWrapper.cs
- MapPathBasedVirtualPathProvider.cs
- TCEAdapterGenerator.cs
- SqlInternalConnectionTds.cs
- QueuePropertyVariants.cs
- ImageDrawing.cs
- BinaryUtilClasses.cs
- XPathItem.cs
- EventRoute.cs
- UrlMapping.cs
- PostBackOptions.cs
- DrawingContextDrawingContextWalker.cs
- AutoCompleteStringCollection.cs
- JsonObjectDataContract.cs
- InlineCollection.cs
- ServicePoint.cs
- Base64Stream.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- CodeStatement.cs
- SendParametersContent.cs
- TdsParserStaticMethods.cs
- ItemsPanelTemplate.cs
- XmlUrlResolver.cs
- ADMembershipUser.cs
- SqlTypeConverter.cs
- DesignerTransactionCloseEvent.cs
- ImageMapEventArgs.cs
- ToolStripItemCollection.cs