Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / PeerInputChannelListener.cs / 1 / PeerInputChannelListener.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Collections.Generic; using System.ServiceModel; using System.Diagnostics; using System.Threading; using System.ServiceModel.Diagnostics; sealed class PeerInputChannelAcceptor : SingletonChannelAcceptor{ PeerNodeImplementation peerNode; PeerNodeImplementation.Registration registration; EndpointAddress localAddress; Uri via; PeerMessageDispatcher dispatcher = null; public PeerInputChannelAcceptor(PeerNodeImplementation peerNode, PeerNodeImplementation.Registration registration, ChannelManagerBase channelManager, EndpointAddress localAddress, Uri via) : base(channelManager) { this.registration = registration; this.peerNode = peerNode; this.localAddress = localAddress; this.via = via; PeerMessageDispatcher .PeerMessageQueueAdapter queueHandler = new PeerMessageDispatcher .PeerMessageQueueAdapter(this); dispatcher = new PeerMessageDispatcher (queueHandler, peerNode, ChannelManager, localAddress, via); } protected override PeerInputChannel OnCreateChannel() { return new PeerInputChannel(peerNode, registration, ChannelManager, localAddress, via); } protected override void OnTraceMessageReceived(Message message) { if (DiagnosticUtility.ShouldTraceInformation) { TraceUtility.TraceEvent(TraceEventType.Information, TraceCode.MessageReceived, MessageTransmitTraceRecord.CreateReceiveTraceRecord(message), this, null); } } protected override void OnClose(TimeSpan timeout) { } protected override void OnClosing() { CloseDispatcher(); base.OnClosing(); } protected override void OnFaulted() { CloseDispatcher(); base.OnFaulted(); } void CloseDispatcher() { if(dispatcher != null) { dispatcher.Unregister(true); dispatcher = null; } } } sealed class PeerInputChannelListener : PeerChannelListener { PeerInputChannelAcceptor inputAcceptor; public PeerInputChannelListener(PeerTransportBindingElement bindingElement, BindingContext context, PeerResolver peerResolver) : base(bindingElement, context, peerResolver) { } protected override PeerInputChannelAcceptor ChannelAcceptor { get { return this.inputAcceptor; } } protected override void CreateAcceptor() { this.inputAcceptor = new PeerInputChannelAcceptor(this.InnerNode, this.Registration, this, new EndpointAddress(this.Uri), this.Uri); } } } // 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
- DiagnosticsConfiguration.cs
- StrongTypingException.cs
- Int32Rect.cs
- ColumnClickEvent.cs
- ArgIterator.cs
- AuthorizationRule.cs
- CultureMapper.cs
- RefreshEventArgs.cs
- FontSizeConverter.cs
- ClaimTypeElementCollection.cs
- ControlBuilderAttribute.cs
- NameValueFileSectionHandler.cs
- EntityViewGenerationConstants.cs
- AdCreatedEventArgs.cs
- XmlSchemaAny.cs
- Section.cs
- Clause.cs
- SingleStorage.cs
- SQLInt64.cs
- XPathExpr.cs
- TypeResolver.cs
- _SpnDictionary.cs
- ControlCommandSet.cs
- TabItem.cs
- WebPartHeaderCloseVerb.cs
- BuildManager.cs
- ProtocolsSection.cs
- UIHelper.cs
- BuildProviderAppliesToAttribute.cs
- InputLangChangeEvent.cs
- XmlSchemaChoice.cs
- SQLMoneyStorage.cs
- SizeAnimationClockResource.cs
- Decimal.cs
- While.cs
- OleDbConnectionFactory.cs
- SinglePhaseEnlistment.cs
- SiteMembershipCondition.cs
- Literal.cs
- Hex.cs
- ArcSegment.cs
- GridViewRow.cs
- SqlDataSourceFilteringEventArgs.cs
- SmtpFailedRecipientsException.cs
- HelloOperationAsyncResult.cs
- _emptywebproxy.cs
- JoinElimination.cs
- SafeFileMappingHandle.cs
- WsatConfiguration.cs
- XmlDownloadManager.cs
- CapabilitiesPattern.cs
- ISessionStateStore.cs
- ServiceOperationViewControl.cs
- SystemWebCachingSectionGroup.cs
- BamlVersionHeader.cs
- MobileControlsSection.cs
- Assembly.cs
- FactoryGenerator.cs
- GetWinFXPath.cs
- PropertyPathWorker.cs
- MailWriter.cs
- IImplicitResourceProvider.cs
- Wrapper.cs
- NonVisualControlAttribute.cs
- RevocationPoint.cs
- QuadraticBezierSegment.cs
- BigIntegerStorage.cs
- WebServiceMethodData.cs
- DocumentEventArgs.cs
- CompiledQueryCacheKey.cs
- DropDownButton.cs
- IntPtr.cs
- LineSegment.cs
- DBCommandBuilder.cs
- HtmlWindow.cs
- MouseGestureValueSerializer.cs
- OleDbParameterCollection.cs
- PropertyDescriptorCollection.cs
- StorageConditionPropertyMapping.cs
- DesignerForm.cs
- EventSinkActivityDesigner.cs
- DataServiceRequest.cs
- XmlQueryContext.cs
- AssemblyGen.cs
- PolicyStatement.cs
- NameNode.cs
- RuntimeArgumentHandle.cs
- ComponentRenameEvent.cs
- ObjectStateEntry.cs
- __ConsoleStream.cs
- ClientTargetSection.cs
- _RequestCacheProtocol.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- UnionCqlBlock.cs
- DefaultPropertyAttribute.cs
- ShaperBuffers.cs
- GradientStop.cs
- Visual3D.cs
- XamlTypeMapper.cs
- DocumentScope.cs