Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- XComponentModel.cs
- ForceCopyBuildProvider.cs
- XamlTypeMapper.cs
- QilBinary.cs
- TargetInvocationException.cs
- LocatorGroup.cs
- ApplicationServiceManager.cs
- ClientReliableChannelBinder.cs
- ObjectComplexPropertyMapping.cs
- CompModSwitches.cs
- AstTree.cs
- AsyncOperationManager.cs
- VectorCollectionValueSerializer.cs
- PagedControl.cs
- ClrPerspective.cs
- AppDomainProtocolHandler.cs
- Profiler.cs
- FixedTextSelectionProcessor.cs
- TreeNodeStyleCollection.cs
- ErrorStyle.cs
- ResetableIterator.cs
- MetadataWorkspace.cs
- DataControlFieldHeaderCell.cs
- DefaultPerformanceCounters.cs
- ValueConversionAttribute.cs
- TdsParserSessionPool.cs
- Compiler.cs
- FirstMatchCodeGroup.cs
- FilterQuery.cs
- XPathScanner.cs
- EpmTargetPathSegment.cs
- ParallelSeparator.xaml.cs
- HostProtectionPermission.cs
- ToolStripStatusLabel.cs
- CheckBoxPopupAdapter.cs
- SelectionUIService.cs
- WebPartMenuStyle.cs
- XmlSchemaExternal.cs
- EmbeddedMailObject.cs
- XmlSchemaDocumentation.cs
- SqlUserDefinedAggregateAttribute.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- MatrixTransform.cs
- XmlTypeMapping.cs
- SQLDateTimeStorage.cs
- SymbolTable.cs
- GraphicsContext.cs
- EntityContainerRelationshipSet.cs
- TreeNodeCollectionEditor.cs
- DataGridViewColumnTypeEditor.cs
- DispatcherHooks.cs
- FigureHelper.cs
- PropertiesTab.cs
- CompletedAsyncResult.cs
- DefaultObjectMappingItemCollection.cs
- ContextStack.cs
- UnSafeCharBuffer.cs
- SingleAnimationUsingKeyFrames.cs
- Comparer.cs
- CompressStream.cs
- TextServicesCompartment.cs
- ContainerFilterService.cs
- WebScriptMetadataMessage.cs
- Itemizer.cs
- SafeNativeMethods.cs
- AggregatePushdown.cs
- TextParagraph.cs
- ElementNotEnabledException.cs
- DaylightTime.cs
- EventLogTraceListener.cs
- DefaultPerformanceCounters.cs
- LogEntrySerializer.cs
- FileDetails.cs
- MsmqTransportSecurityElement.cs
- ArglessEventHandlerProxy.cs
- CodeEventReferenceExpression.cs
- FieldDescriptor.cs
- DataGridViewCellValueEventArgs.cs
- TypeForwardedToAttribute.cs
- SqlConnectionManager.cs
- PerfProviderCollection.cs
- TypeSystemHelpers.cs
- ObjectDataSource.cs
- MessageHeaderInfoTraceRecord.cs
- DelayLoadType.cs
- DocumentScope.cs
- SerializationInfoEnumerator.cs
- UnmanagedHandle.cs
- BinaryMethodMessage.cs
- PseudoWebRequest.cs
- KeyManager.cs
- StringSorter.cs
- VolatileEnlistmentState.cs
- OdbcError.cs
- StyleHelper.cs
- SecurityDescriptor.cs
- TreeNodeEventArgs.cs
- InvokeHandlers.cs
- TypeUtil.cs
- HttpConfigurationContext.cs