Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- Quack.cs
- MenuItemBinding.cs
- DataGridViewColumnStateChangedEventArgs.cs
- TCEAdapterGenerator.cs
- TypedAsyncResult.cs
- COM2IDispatchConverter.cs
- Unit.cs
- PlatformCulture.cs
- DispatcherExceptionEventArgs.cs
- ValidatedControlConverter.cs
- ToolStripItemTextRenderEventArgs.cs
- PropertyEmitterBase.cs
- ByteConverter.cs
- CodeLinePragma.cs
- UIElementCollection.cs
- SafeBitVector32.cs
- SizeAnimationBase.cs
- HeaderPanel.cs
- HttpApplicationFactory.cs
- FlowLayoutSettings.cs
- AccessibleObject.cs
- TemplateNameScope.cs
- XNodeSchemaApplier.cs
- ListSortDescriptionCollection.cs
- Inline.cs
- String.cs
- AssociationType.cs
- RoutedCommand.cs
- GlyphRunDrawing.cs
- CodeSnippetTypeMember.cs
- SessionEndingEventArgs.cs
- WebResourceAttribute.cs
- Pkcs7Signer.cs
- EncodingDataItem.cs
- QilList.cs
- AutomationProperty.cs
- RoleGroupCollection.cs
- MemberPath.cs
- UserControl.cs
- SessionStateUtil.cs
- SvcMapFileLoader.cs
- IxmlLineInfo.cs
- Geometry3D.cs
- CodeGeneratorAttribute.cs
- SqlDataSourceView.cs
- FieldTemplateFactory.cs
- NumericUpDownAcceleration.cs
- PreviewPrintController.cs
- KnownTypesHelper.cs
- ViewValidator.cs
- ConnectionStringsSection.cs
- FontStyle.cs
- DesignerView.Commands.cs
- PrintPreviewDialog.cs
- TabItemAutomationPeer.cs
- DataFormats.cs
- ThemeDictionaryExtension.cs
- ReceiveSecurityHeader.cs
- RawStylusInput.cs
- NativeRecognizer.cs
- Column.cs
- CallbackValidator.cs
- TraceSection.cs
- FixedStringLookup.cs
- DropShadowBitmapEffect.cs
- IDQuery.cs
- TcpServerChannel.cs
- ControlType.cs
- EventLogPermissionEntryCollection.cs
- IconHelper.cs
- ExecutedRoutedEventArgs.cs
- OleStrCAMarshaler.cs
- MetadataItemEmitter.cs
- RegexGroup.cs
- DocumentPageTextView.cs
- StateRuntime.cs
- TextTreeNode.cs
- TrackingExtract.cs
- DefaultTextStoreTextComposition.cs
- ArraySegment.cs
- PrintingPermission.cs
- ParameterModifier.cs
- ConfigXmlSignificantWhitespace.cs
- SctClaimDictionary.cs
- NativeObjectSecurity.cs
- TypeSchema.cs
- PermissionRequestEvidence.cs
- ItemDragEvent.cs
- StylusLogic.cs
- QueryOperatorEnumerator.cs
- UserNamePasswordValidator.cs
- VisualStyleRenderer.cs
- NameTable.cs
- SourceChangedEventArgs.cs
- TreeNodeBinding.cs
- EventLogLink.cs
- ObjectListTitleAttribute.cs
- LogConverter.cs
- ListViewDataItem.cs
- COM2Properties.cs