Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / SMSvcHost / System / ServiceModel / Activation / ListenerSingletonConnectionReader.cs / 1 / ListenerSingletonConnectionReader.cs
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------
namespace System.ServiceModel.Activation
{
using System.ServiceModel.Channels;
class ListenerSingletonConnectionReader : DupHandleConnectionReader
{
ServerSingletonDecoder decoder;
public ListenerSingletonConnectionReader(IConnection connection,
ItemDequeuedCallback connectionDequeuedCallback, TransportType transportType,
long streamPosition, int offset, int size,
ConnectionClosedCallback closedCallback, ViaDecodedCallback viaDecodedCallback)
: base(connection, connectionDequeuedCallback, transportType, offset, size, closedCallback, viaDecodedCallback)
{
this.decoder = new ServerSingletonDecoder(streamPosition, ListenerConstants.MaxUriSize, ListenerConstants.SharedMaxContentTypeSize);
}
protected override bool CanDupHandle(out Uri via)
{
if (decoder.CurrentState == ServerSingletonDecoder.State.ReadingContentTypeRecord)
{
via = decoder.Via;
return true;
}
else
{
via = null;
return false;
}
}
protected override int Decode(byte[] buffer, int offset, int size)
{
return decoder.Decode(buffer, offset, size);
}
protected override Exception CreatePrematureEOFException()
{
return decoder.CreatePrematureEOFException();
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SeparatorAutomationPeer.cs
- Calendar.cs
- SqlTopReducer.cs
- SafeNativeMethodsMilCoreApi.cs
- relpropertyhelper.cs
- SqlDataSourceSummaryPanel.cs
- Dispatcher.cs
- SQLInt64.cs
- DocumentApplicationState.cs
- XPathNavigatorKeyComparer.cs
- OpacityConverter.cs
- HelpFileFileNameEditor.cs
- ProxyFragment.cs
- counter.cs
- UserPersonalizationStateInfo.cs
- ScheduleChanges.cs
- PageCatalogPart.cs
- Compress.cs
- ErrorHandlingReceiver.cs
- EventSinkHelperWriter.cs
- PathGradientBrush.cs
- webproxy.cs
- SessionStateContainer.cs
- localization.cs
- ContextMenuStripGroup.cs
- OracleInternalConnection.cs
- EntityDataSourceContextDisposingEventArgs.cs
- ArgumentOutOfRangeException.cs
- ResourcePool.cs
- GlyphsSerializer.cs
- XpsDigitalSignature.cs
- GlobalItem.cs
- SystemIPGlobalProperties.cs
- XsltOutput.cs
- EtwTrace.cs
- ScrollContentPresenter.cs
- Stopwatch.cs
- RelatedView.cs
- ToolBarTray.cs
- RegexMatchCollection.cs
- LeafCellTreeNode.cs
- X509Certificate2.cs
- SecureUICommand.cs
- HttpConfigurationSystem.cs
- PointAnimationBase.cs
- PathFigureCollectionConverter.cs
- MembershipSection.cs
- ObfuscationAttribute.cs
- EmbeddedMailObjectsCollection.cs
- AvtEvent.cs
- TextFormatter.cs
- ColumnCollectionEditor.cs
- AdornerDecorator.cs
- SelectionPattern.cs
- PersonalizationProvider.cs
- UnsafeMethods.cs
- tooltip.cs
- UDPClient.cs
- RC2CryptoServiceProvider.cs
- Figure.cs
- unsafenativemethodstextservices.cs
- DbCommandDefinition.cs
- DisplayNameAttribute.cs
- SettingsContext.cs
- EmbeddedMailObject.cs
- MarkupCompilePass2.cs
- WebPartsPersonalization.cs
- CodeRemoveEventStatement.cs
- DataGridViewColumnTypeEditor.cs
- UnmanagedBitmapWrapper.cs
- Utils.cs
- QuadraticBezierSegment.cs
- TickBar.cs
- ILGenerator.cs
- Attribute.cs
- Int64KeyFrameCollection.cs
- DesignerTransaction.cs
- OleDragDropHandler.cs
- Attributes.cs
- RSAPKCS1SignatureDeformatter.cs
- SessionStateSection.cs
- webeventbuffer.cs
- OutputCacheProfile.cs
- OutputScope.cs
- MulticastDelegate.cs
- NativeBuffer.cs
- HtmlTable.cs
- BookmarkList.cs
- ProjectionAnalyzer.cs
- DataGridPagerStyle.cs
- PathFigure.cs
- ByteFacetDescriptionElement.cs
- LowerCaseStringConverter.cs
- FileEnumerator.cs
- EpmTargetPathSegment.cs
- XamlFilter.cs
- FileDialog.cs
- BaseInfoTable.cs
- ProxyWebPart.cs
- BigInt.cs