Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / SMSvcHost / System / ServiceModel / Activation / ListenerSessionConnectionReader.cs / 1 / ListenerSessionConnectionReader.cs
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------
namespace System.ServiceModel.Activation
{
using System.ServiceModel.Channels;
class ListenerSessionConnectionReader : DupHandleConnectionReader
{
ServerSessionDecoder decoder;
public ListenerSessionConnectionReader(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 ServerSessionDecoder(streamPosition, ListenerConstants.MaxUriSize, ListenerConstants.SharedMaxContentTypeSize);
}
protected override bool CanDupHandle(out Uri via)
{
if (decoder.CurrentState == ServerSessionDecoder.State.PreUpgradeStart)
{
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
- Imaging.cs
- RegistrationContext.cs
- ZoneButton.cs
- Models.cs
- TypeSource.cs
- ZipIOExtraFieldPaddingElement.cs
- LocalIdKeyIdentifierClause.cs
- BasicExpandProvider.cs
- DataSourceView.cs
- PrimaryKeyTypeConverter.cs
- RawStylusSystemGestureInputReport.cs
- RegistrationProxy.cs
- WindowsSpinner.cs
- HTMLTextWriter.cs
- SQLDoubleStorage.cs
- CachedCompositeFamily.cs
- ControlCachePolicy.cs
- UIElementParagraph.cs
- ConditionCollection.cs
- Calendar.cs
- SqlDependencyUtils.cs
- StringOutput.cs
- ProfileSettings.cs
- QuotedPrintableStream.cs
- QueryConverter.cs
- SymbolEqualComparer.cs
- SmiXetterAccessMap.cs
- SingleSelectRootGridEntry.cs
- AuthenticationServiceManager.cs
- PrivilegedConfigurationManager.cs
- BulletedListEventArgs.cs
- InvariantComparer.cs
- CallbackWrapper.cs
- PermissionSetTriple.cs
- EndpointNotFoundException.cs
- EntityModelBuildProvider.cs
- RelationshipManager.cs
- ExtensionSurface.cs
- BitmapEffectGroup.cs
- Visual3D.cs
- WindowsFont.cs
- StringToken.cs
- PreviewPageInfo.cs
- LogManagementAsyncResult.cs
- ControlType.cs
- __TransparentProxy.cs
- ErrorView.xaml.cs
- OrderedDictionary.cs
- XmlSchemaValidator.cs
- DocumentXmlWriter.cs
- ControlValuePropertyAttribute.cs
- GuidelineCollection.cs
- Signature.cs
- ByteStorage.cs
- FormViewInsertedEventArgs.cs
- ControlIdConverter.cs
- RadioButtonBaseAdapter.cs
- TraceHandlerErrorFormatter.cs
- FacetDescriptionElement.cs
- PeerCollaboration.cs
- TreeView.cs
- ScrollItemPattern.cs
- VolatileEnlistmentMultiplexing.cs
- Configuration.cs
- XmlHierarchyData.cs
- DataGridCellEditEndingEventArgs.cs
- FileUtil.cs
- StrokeCollection2.cs
- ScrollBarRenderer.cs
- Activity.cs
- Line.cs
- BasicDesignerLoader.cs
- LineServicesRun.cs
- NamespaceList.cs
- LoginName.cs
- Size3D.cs
- Icon.cs
- CanonicalXml.cs
- ScalarOps.cs
- MenuStrip.cs
- SystemIPInterfaceProperties.cs
- TextAutomationPeer.cs
- CodeCompiler.cs
- XmlKeywords.cs
- XPathNavigatorReader.cs
- HeaderUtility.cs
- Classification.cs
- CategoryAttribute.cs
- StreamResourceInfo.cs
- FormatterServices.cs
- ElementHost.cs
- InteropEnvironment.cs
- RegionData.cs
- ScriptControl.cs
- DataRowChangeEvent.cs
- MimeTypePropertyAttribute.cs
- BufferedResponseStream.cs
- Hyperlink.cs
- BaseAsyncResult.cs
- TemplateKey.cs