Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / TcpConnectionPoolSettings.cs / 1 / TcpConnectionPoolSettings.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { public sealed class TcpConnectionPoolSettings { string groupName; TimeSpan idleTimeout; TimeSpan leaseTimeout; int maxOutboundConnectionsPerEndpoint; internal TcpConnectionPoolSettings() { groupName = ConnectionOrientedTransportDefaults.ConnectionPoolGroupName; idleTimeout = ConnectionOrientedTransportDefaults.IdleTimeout; leaseTimeout = TcpTransportDefaults.ConnectionLeaseTimeout; maxOutboundConnectionsPerEndpoint = ConnectionOrientedTransportDefaults.MaxOutboundConnectionsPerEndpoint; } internal TcpConnectionPoolSettings(TcpConnectionPoolSettings tcp) { this.groupName = tcp.groupName; this.idleTimeout = tcp.idleTimeout; this.leaseTimeout = tcp.leaseTimeout; this.maxOutboundConnectionsPerEndpoint = tcp.maxOutboundConnectionsPerEndpoint; } public string GroupName { get { return this.groupName; } set { if (value == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("value"); this.groupName = value; } } 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 this.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 MaxOutboundConnectionsPerEndpoint { get { return this.maxOutboundConnectionsPerEndpoint; } set { if (value < 0) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.ValueMustBeNonNegative))); this.maxOutboundConnectionsPerEndpoint = value; } } internal TcpConnectionPoolSettings Clone() { return new TcpConnectionPoolSettings(this); } internal bool IsMatch(TcpConnectionPoolSettings tcp) { if (this.groupName != tcp.groupName) return false; if (this.idleTimeout != tcp.idleTimeout) return false; if (this.leaseTimeout != tcp.leaseTimeout) return false; if (this.maxOutboundConnectionsPerEndpoint != tcp.maxOutboundConnectionsPerEndpoint) 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
- XmlnsDefinitionAttribute.cs
- DecimalSumAggregationOperator.cs
- SiteMapNodeCollection.cs
- DataServiceRequestOfT.cs
- TraceHandlerErrorFormatter.cs
- GridViewColumnHeader.cs
- DispatchOperation.cs
- SettingsBase.cs
- DocumentGridPage.cs
- HtmlShim.cs
- CheckBoxRenderer.cs
- NoClickablePointException.cs
- GridItemPatternIdentifiers.cs
- ComponentRenameEvent.cs
- AccessControlEntry.cs
- TextTreeInsertElementUndoUnit.cs
- ObjectAnimationUsingKeyFrames.cs
- PrivilegedConfigurationManager.cs
- FastEncoder.cs
- FamilyCollection.cs
- ReadWriteSpinLock.cs
- ArrayHelper.cs
- ToolTip.cs
- AuthenticationSection.cs
- Point.cs
- RayMeshGeometry3DHitTestResult.cs
- Expander.cs
- AdRotator.cs
- Number.cs
- ISFClipboardData.cs
- DataGridRowsPresenter.cs
- EUCJPEncoding.cs
- BitmapCodecInfoInternal.cs
- DecimalAnimation.cs
- SqlIdentifier.cs
- ConnectionStringsSection.cs
- HandlerFactoryWrapper.cs
- FontStyles.cs
- ADConnectionHelper.cs
- TailCallAnalyzer.cs
- DiscoveryViaBehavior.cs
- MetadataArtifactLoader.cs
- Operator.cs
- HuffmanTree.cs
- CorePropertiesFilter.cs
- _OverlappedAsyncResult.cs
- MessageContractAttribute.cs
- EmbeddedMailObjectsCollection.cs
- CheckBox.cs
- SingleObjectCollection.cs
- IconConverter.cs
- PagePropertiesChangingEventArgs.cs
- Win32Native.cs
- SQLMoney.cs
- Walker.cs
- NetworkCredential.cs
- WindowsPen.cs
- AccessibilityApplicationManager.cs
- DynamicILGenerator.cs
- SQLInt32Storage.cs
- contentDescriptor.cs
- NullableConverter.cs
- ServiceModelConfigurationSectionGroup.cs
- XmlSchemaImport.cs
- CryptoStream.cs
- DynamicMethod.cs
- GAC.cs
- TrustSection.cs
- WebPartsPersonalization.cs
- CryptoProvider.cs
- DataContractSet.cs
- GPRECTF.cs
- AssociationEndMember.cs
- HandlerMappingMemo.cs
- SchemaImporterExtensionElementCollection.cs
- ContractSearchPattern.cs
- ChangePasswordAutoFormat.cs
- LocalizableAttribute.cs
- PathGradientBrush.cs
- Attributes.cs
- listitem.cs
- ThreadPool.cs
- RectangleF.cs
- ObjectDisposedException.cs
- KeyNotFoundException.cs
- BaseCodeDomTreeGenerator.cs
- StartUpEventArgs.cs
- CommandID.cs
- GroupBoxDesigner.cs
- MatrixConverter.cs
- DecoratedNameAttribute.cs
- AppLevelCompilationSectionCache.cs
- IPPacketInformation.cs
- BoundColumn.cs
- ReachSerializerAsync.cs
- FilterQuery.cs
- SchemaEntity.cs
- SqlFunctionAttribute.cs
- DrawingServices.cs
- TraceLog.cs