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
- SoapCommonClasses.cs
- DecimalConverter.cs
- TypeDescriptionProviderAttribute.cs
- BadImageFormatException.cs
- FontFamilyValueSerializer.cs
- WebControlAdapter.cs
- CodeTypeConstructor.cs
- SchemaObjectWriter.cs
- X509CertificateChain.cs
- DrawToolTipEventArgs.cs
- ValidationHelper.cs
- TimeoutException.cs
- TreeNodeStyle.cs
- WorkflowTransactionService.cs
- XmlAnyElementAttributes.cs
- MetadataItemEmitter.cs
- _IPv4Address.cs
- SizeKeyFrameCollection.cs
- WindowsRichEditRange.cs
- ColumnBinding.cs
- ReaderWriterLock.cs
- ExceptionAggregator.cs
- EntityDataSourceMemberPath.cs
- HtmlInputRadioButton.cs
- CryptoConfig.cs
- EnumerableCollectionView.cs
- TreeNodeEventArgs.cs
- COAUTHIDENTITY.cs
- DictionarySectionHandler.cs
- WebUtil.cs
- InvalidPrinterException.cs
- ReturnEventArgs.cs
- HttpListenerPrefixCollection.cs
- PartialCachingControl.cs
- SystemIPInterfaceStatistics.cs
- DoubleLinkList.cs
- OdbcFactory.cs
- RectAnimationClockResource.cs
- AnimatedTypeHelpers.cs
- WebPartEditorApplyVerb.cs
- Span.cs
- WebExceptionStatus.cs
- HierarchicalDataBoundControl.cs
- LabelDesigner.cs
- CodeSnippetCompileUnit.cs
- SingleResultAttribute.cs
- WebBrowserDocumentCompletedEventHandler.cs
- SQLStringStorage.cs
- SqlGatherProducedAliases.cs
- Sql8ExpressionRewriter.cs
- GetPageNumberCompletedEventArgs.cs
- ControllableStoryboardAction.cs
- ProfileSettings.cs
- XmlAttributeCollection.cs
- ResourcesChangeInfo.cs
- PropertyManager.cs
- WebPartsPersonalization.cs
- OracleMonthSpan.cs
- GeneralTransform3DGroup.cs
- SerializationObjectManager.cs
- mediaclock.cs
- OleDbParameter.cs
- DataPagerFieldItem.cs
- MimeFormatter.cs
- CategoryGridEntry.cs
- PEFileEvidenceFactory.cs
- EntityDataSourceDataSelection.cs
- WorkflowItemPresenter.cs
- PrivilegeNotHeldException.cs
- SqlFormatter.cs
- WebPartConnection.cs
- PopOutPanel.cs
- CreatingCookieEventArgs.cs
- ListManagerBindingsCollection.cs
- DetailsView.cs
- EdmFunction.cs
- SqlGatherConsumedAliases.cs
- SharedStatics.cs
- TypographyProperties.cs
- TextTrailingCharacterEllipsis.cs
- DecimalAnimationBase.cs
- LinqDataSourceView.cs
- FontClient.cs
- ResourceReferenceKeyNotFoundException.cs
- FileNotFoundException.cs
- KeySpline.cs
- HashMembershipCondition.cs
- RangeValueProviderWrapper.cs
- MetadataItemSerializer.cs
- PageThemeBuildProvider.cs
- ToolStripGripRenderEventArgs.cs
- ProfileInfo.cs
- AuthorizationSection.cs
- Win32Exception.cs
- MailWriter.cs
- safelinkcollection.cs
- InvalidWMPVersionException.cs
- Parameter.cs
- SecurityPermission.cs
- UnauthorizedWebPart.cs