Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / ChannelPoolSettings.cs / 1 / ChannelPoolSettings.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; public class ChannelPoolSettings { TimeSpan idleTimeout; TimeSpan leaseTimeout; int maxOutboundChannelsPerEndpoint; public ChannelPoolSettings() { this.idleTimeout = OneWayDefaults.IdleTimeout; this.leaseTimeout = OneWayDefaults.LeaseTimeout; this.maxOutboundChannelsPerEndpoint = OneWayDefaults.MaxOutboundChannelsPerEndpoint; } ChannelPoolSettings(ChannelPoolSettings poolToBeCloned) { this.idleTimeout = poolToBeCloned.idleTimeout; this.leaseTimeout = poolToBeCloned.leaseTimeout; this.maxOutboundChannelsPerEndpoint = poolToBeCloned.maxOutboundChannelsPerEndpoint; } public TimeSpan IdleTimeout { get { return this.idleTimeout; } set { if (value < TimeSpan.Zero) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRange0))); } if (TimeoutHelper.IsTooLarge(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRangeTooBig))); } this.idleTimeout = value; } } public TimeSpan LeaseTimeout { get { return leaseTimeout; } set { if (value < TimeSpan.Zero) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRange0))); } if (TimeoutHelper.IsTooLarge(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.SFxTimeoutOutOfRangeTooBig))); } this.leaseTimeout = value; } } public int MaxOutboundChannelsPerEndpoint { get { return this.maxOutboundChannelsPerEndpoint; } set { if (value <= 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.ValueMustBePositive))); } this.maxOutboundChannelsPerEndpoint = value; } } internal ChannelPoolSettings Clone() { return new ChannelPoolSettings(this); } internal bool IsMatch(ChannelPoolSettings channelPoolSettings) { if (channelPoolSettings == null) { return false; } if (this.idleTimeout != channelPoolSettings.idleTimeout) { return false; } if (this.leaseTimeout != channelPoolSettings.leaseTimeout) { return false; } if (this.maxOutboundChannelsPerEndpoint != channelPoolSettings.maxOutboundChannelsPerEndpoint) { return false; } return true; } } } // 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
- DuplicateWaitObjectException.cs
- GridSplitterAutomationPeer.cs
- ClassDataContract.cs
- SessionParameter.cs
- EndOfStreamException.cs
- Converter.cs
- BaseParser.cs
- TypeUsageBuilder.cs
- CollectionTraceRecord.cs
- NaturalLanguageHyphenator.cs
- TypedServiceChannelBuilder.cs
- TextRangeBase.cs
- TableStyle.cs
- TextEffect.cs
- GregorianCalendarHelper.cs
- ThrowHelper.cs
- UnauthorizedWebPart.cs
- LogWriteRestartAreaAsyncResult.cs
- ComponentDispatcherThread.cs
- AccessViolationException.cs
- EventWaitHandle.cs
- TreeViewCancelEvent.cs
- XmlSchemaComplexContent.cs
- Blend.cs
- Baml2006KeyRecord.cs
- DataServiceException.cs
- UnknownBitmapEncoder.cs
- OdbcConnectionHandle.cs
- WebRequestModuleElement.cs
- URLIdentityPermission.cs
- FlatButtonAppearance.cs
- InvalidComObjectException.cs
- Header.cs
- XPathPatternParser.cs
- NativeMethods.cs
- XsltLibrary.cs
- DataTable.cs
- AsyncCodeActivityContext.cs
- SoapParser.cs
- MdImport.cs
- SafeCoTaskMem.cs
- BulletedListEventArgs.cs
- SqlRewriteScalarSubqueries.cs
- MetadataHelper.cs
- CroppedBitmap.cs
- CapabilitiesAssignment.cs
- LinkedResourceCollection.cs
- PageCopyCount.cs
- SelectionRangeConverter.cs
- ConfigDefinitionUpdates.cs
- FontStyles.cs
- UIElementParagraph.cs
- Pipe.cs
- FileDataSourceCache.cs
- TypeNameConverter.cs
- And.cs
- QueryOptionExpression.cs
- JoinElimination.cs
- XamlTypeMapper.cs
- DataRecordInternal.cs
- CopyNamespacesAction.cs
- KeyFrames.cs
- PackagePartCollection.cs
- DoubleSumAggregationOperator.cs
- ConfigurationValidatorAttribute.cs
- DbConnectionPoolGroup.cs
- HeaderCollection.cs
- ServiceMetadataPublishingElement.cs
- XmlSchemaComplexType.cs
- Document.cs
- TextTreePropertyUndoUnit.cs
- XmlIgnoreAttribute.cs
- RulePatternOps.cs
- DynamicDocumentPaginator.cs
- XmlAttributeProperties.cs
- SqlDependencyListener.cs
- PersonalizablePropertyEntry.cs
- XmlDictionary.cs
- DocumentPaginator.cs
- DocumentOutline.cs
- RIPEMD160Managed.cs
- RemoteWebConfigurationHost.cs
- OleDbMetaDataFactory.cs
- MatrixAnimationUsingPath.cs
- StronglyTypedResourceBuilder.cs
- KeyedCollection.cs
- CurrencyManager.cs
- NativeMethods.cs
- TrackingServices.cs
- PeerSecurityHelpers.cs
- ThrowOnMultipleAssignment.cs
- ProfileGroupSettings.cs
- SqlDataReader.cs
- MatrixCamera.cs
- ExpressionBuilder.cs
- LocatorPartList.cs
- WebPartDisplayModeCollection.cs
- XmlSchemaNotation.cs
- BamlBinaryReader.cs
- TargetControlTypeAttribute.cs