Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / ChannelPool.cs / 1 / ChannelPool.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Collections.Generic; using System.ServiceModel; using System.Runtime.Serialization; using System.Xml; using System.ServiceModel.Description; using System.ServiceModel.Security; using System.Text; ////// Pool of channels used by OneWayChannelFactories /// class ChannelPool: IdlingCommunicationPool where TChannel : class, IChannel { public ChannelPool(ChannelPoolSettings settings) : base(settings.MaxOutboundChannelsPerEndpoint, settings.IdleTimeout, settings.LeaseTimeout) { } protected override void AbortItem(TChannel item) { item.Abort(); } protected override void CloseItem(TChannel item, TimeSpan timeout) { item.Close(timeout); } protected override ChannelPoolKey GetPoolKey(EndpointAddress address, Uri via) { return new ChannelPoolKey(address, via); } } class ChannelPoolKey : IEquatable { EndpointAddress address; Uri via; public ChannelPoolKey(EndpointAddress address, Uri via) { this.address = address; this.via = via; } public override int GetHashCode() { return address.GetHashCode() + via.GetHashCode(); } public bool Equals(ChannelPoolKey other) { return address.EndpointEquals(other.address) && via.Equals(other.via); } } } // 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
- SqlTransaction.cs
- AsymmetricSignatureFormatter.cs
- SqlClientMetaDataCollectionNames.cs
- UpdateManifestForBrowserApplication.cs
- DiagnosticsConfiguration.cs
- MappingMetadataHelper.cs
- ListBox.cs
- ToolStripItem.cs
- TypeUtil.cs
- RepeatBehavior.cs
- ButtonFlatAdapter.cs
- Constants.cs
- ChameleonKey.cs
- WebConfigurationHostFileChange.cs
- AssemblyAttributes.cs
- ContentElement.cs
- ConnectAlgorithms.cs
- ColumnMapCopier.cs
- newitemfactory.cs
- SingletonConnectionReader.cs
- InvalidDocumentContentsException.cs
- XmlNamedNodeMap.cs
- ContentAlignmentEditor.cs
- FrameSecurityDescriptor.cs
- GroupItem.cs
- KnownBoxes.cs
- LiteralControl.cs
- BrowserDefinitionCollection.cs
- DataGridCellsPresenter.cs
- Line.cs
- UserPrincipalNameElement.cs
- OleDbInfoMessageEvent.cs
- Wizard.cs
- ComponentResourceKey.cs
- Model3D.cs
- ObjectContext.cs
- BindingValueChangedEventArgs.cs
- DesignTimeSiteMapProvider.cs
- WinCategoryAttribute.cs
- GroupBox.cs
- BindingValueChangedEventArgs.cs
- GeneralTransform.cs
- OdbcFactory.cs
- IdnMapping.cs
- CodeMemberEvent.cs
- controlskin.cs
- EventLogPermissionAttribute.cs
- MappingException.cs
- RNGCryptoServiceProvider.cs
- TextEditorDragDrop.cs
- EndPoint.cs
- ObjectStateEntryDbDataRecord.cs
- ProcessMonitor.cs
- NamespaceQuery.cs
- DirectionalLight.cs
- HttpListener.cs
- ParseHttpDate.cs
- ListViewContainer.cs
- PasswordBoxAutomationPeer.cs
- RewritingProcessor.cs
- Deflater.cs
- XamlFilter.cs
- DesignerCommandSet.cs
- BufferedReadStream.cs
- TraceContextEventArgs.cs
- CompilationUnit.cs
- ObjectConverter.cs
- SplitContainer.cs
- ExeConfigurationFileMap.cs
- SpecularMaterial.cs
- XslTransformFileEditor.cs
- EventHandlers.cs
- SerializerProvider.cs
- SubpageParaClient.cs
- TypeReference.cs
- SByte.cs
- OLEDB_Enum.cs
- UpdateCommand.cs
- DetailsViewRowCollection.cs
- GradientBrush.cs
- AffineTransform3D.cs
- SymbolMethod.cs
- TaskFormBase.cs
- ImageAttributes.cs
- FlowLayout.cs
- PageClientProxyGenerator.cs
- PropertyDescriptorCollection.cs
- MsmqInputChannelListener.cs
- TextLineResult.cs
- ViewBox.cs
- MimeFormatter.cs
- PageCatalogPart.cs
- ConstructorBuilder.cs
- SecurityKeyUsage.cs
- EncoderFallback.cs
- Popup.cs
- Gdiplus.cs
- DetailsViewRowCollection.cs
- ObjectKeyFrameCollection.cs
- XmlSchemaIdentityConstraint.cs