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
- DataGridViewCellEventArgs.cs
- InstanceKeyCollisionException.cs
- HttpClientCredentialType.cs
- ScrollBar.cs
- HMACSHA256.cs
- ActivityExecutionWorkItem.cs
- ProtocolsInstallComponent.cs
- _ShellExpression.cs
- FontFamilyIdentifier.cs
- EdmEntityTypeAttribute.cs
- ConfigurationPropertyAttribute.cs
- DataServiceStreamResponse.cs
- FontStretch.cs
- XmlLinkedNode.cs
- DataRowComparer.cs
- SocketInformation.cs
- ScriptingProfileServiceSection.cs
- SystemIPInterfaceStatistics.cs
- SerTrace.cs
- StringFunctions.cs
- DSASignatureDeformatter.cs
- CommandSet.cs
- PreviewPrintController.cs
- TextTreeTextBlock.cs
- StringInfo.cs
- ContentType.cs
- BaseCollection.cs
- ProtectedConfigurationSection.cs
- KeyedQueue.cs
- WindowsFormsHostPropertyMap.cs
- EntityDataSourceWrapper.cs
- DataGridViewRowsAddedEventArgs.cs
- jithelpers.cs
- ToolBarOverflowPanel.cs
- Delay.cs
- CorrelationValidator.cs
- CollectionChangeEventArgs.cs
- HtmlInputPassword.cs
- JsonFormatGeneratorStatics.cs
- Condition.cs
- FrameworkElementFactory.cs
- XmlnsCompatibleWithAttribute.cs
- ApplicationCommands.cs
- ListViewPagedDataSource.cs
- TrackingMemoryStreamFactory.cs
- TextServicesCompartmentContext.cs
- SendKeys.cs
- WindowsScroll.cs
- GcSettings.cs
- DragDrop.cs
- EntityTypeEmitter.cs
- DataGridParentRows.cs
- ConnectionInterfaceCollection.cs
- PeerCollaboration.cs
- CompilationUtil.cs
- NativeMethodsOther.cs
- FormsAuthenticationModule.cs
- Size.cs
- NativeMethods.cs
- DependencyPropertyHelper.cs
- SqlCacheDependencyDatabaseCollection.cs
- UInt64Storage.cs
- GeneralTransformCollection.cs
- RotateTransform3D.cs
- FontUnit.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- InfoCardTraceRecord.cs
- XmlSecureResolver.cs
- RuntimeHelpers.cs
- DecimalAnimation.cs
- AuthenticationServiceManager.cs
- OperationFormatStyle.cs
- ListBoxChrome.cs
- Binding.cs
- NativeMethodsOther.cs
- ParsedAttributeCollection.cs
- HostProtectionException.cs
- TraceContextRecord.cs
- ContentHostHelper.cs
- Error.cs
- ServiceDescriptionData.cs
- RenderContext.cs
- ListViewDeleteEventArgs.cs
- SortQuery.cs
- WebServiceFaultDesigner.cs
- TypeConverterBase.cs
- DynamicUpdateCommand.cs
- StylusPointPropertyUnit.cs
- XPathItem.cs
- ResourceSet.cs
- BinaryOperationBinder.cs
- AlternateViewCollection.cs
- DateTimeFormatInfo.cs
- BindingNavigator.cs
- RegistryKey.cs
- DataGridView.cs
- QuaternionRotation3D.cs
- DriveInfo.cs
- SimpleApplicationHost.cs
- VirtualizedCellInfoCollection.cs