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
- EpmSourcePathSegment.cs
- RuleInfoComparer.cs
- HttpSessionStateBase.cs
- ADMembershipUser.cs
- FontFaceLayoutInfo.cs
- DataServiceQueryException.cs
- GridViewColumn.cs
- GridPattern.cs
- IdentityReference.cs
- CreateUserWizard.cs
- EnumDataContract.cs
- DetailsViewDeletedEventArgs.cs
- NullableIntAverageAggregationOperator.cs
- WinFormsComponentEditor.cs
- FastEncoderWindow.cs
- ToolBarButton.cs
- XmlDocument.cs
- DmlSqlGenerator.cs
- Array.cs
- DataViewListener.cs
- columnmapkeybuilder.cs
- WeakHashtable.cs
- CodeDelegateInvokeExpression.cs
- ZoneButton.cs
- ColorAnimation.cs
- GPStream.cs
- TextParaClient.cs
- XsltContext.cs
- DirectoryObjectSecurity.cs
- EventEntry.cs
- AutoSizeToolBoxItem.cs
- DataGridCheckBoxColumn.cs
- SaveFileDialog.cs
- FolderBrowserDialogDesigner.cs
- FrameworkElementFactory.cs
- RelationshipConverter.cs
- CompiledQuery.cs
- EntityContainerAssociationSet.cs
- ExpressionReplacer.cs
- _LocalDataStore.cs
- InvalidDataContractException.cs
- XmlIgnoreAttribute.cs
- ConfigDefinitionUpdates.cs
- QuaternionAnimation.cs
- BlockCollection.cs
- ImageKeyConverter.cs
- DataServiceEntityAttribute.cs
- EventBuilder.cs
- indexingfiltermarshaler.cs
- MethodSet.cs
- SerializerProvider.cs
- EntityDataSourceReferenceGroup.cs
- TemplateBindingExtensionConverter.cs
- StickyNoteContentControl.cs
- CatalogPartChrome.cs
- Repeater.cs
- Menu.cs
- BindingCompleteEventArgs.cs
- FastEncoder.cs
- WpfWebRequestHelper.cs
- Control.cs
- rsa.cs
- BaseTemplateParser.cs
- DataContractFormatAttribute.cs
- Transform3D.cs
- JsonReader.cs
- DrawingBrush.cs
- ArraySortHelper.cs
- SoapIgnoreAttribute.cs
- EncodingInfo.cs
- JoinTreeNode.cs
- SHA512.cs
- DocumentEventArgs.cs
- x509store.cs
- LineGeometry.cs
- CompilerState.cs
- UInt32Storage.cs
- ColumnWidthChangingEvent.cs
- DataObjectPastingEventArgs.cs
- ChameleonKey.cs
- LoginViewDesigner.cs
- ImportCatalogPart.cs
- ISO2022Encoding.cs
- VisemeEventArgs.cs
- Run.cs
- ExpandCollapsePattern.cs
- NotFiniteNumberException.cs
- EdmItemError.cs
- TreeView.cs
- EdgeProfileValidation.cs
- ObjectListDesigner.cs
- WebException.cs
- RequestCacheEntry.cs
- CompoundFileStorageReference.cs
- AsymmetricSignatureDeformatter.cs
- XmlSignatureProperties.cs
- MasterPageParser.cs
- TablePatternIdentifiers.cs
- HtmlTableCell.cs
- precedingsibling.cs