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
- TableParaClient.cs
- BitmapFrameEncode.cs
- WebPartTracker.cs
- CheckBoxStandardAdapter.cs
- FolderBrowserDialogDesigner.cs
- _BufferOffsetSize.cs
- PointAnimationClockResource.cs
- ValueUtilsSmi.cs
- ValueTypeIndexerReference.cs
- AutomationProperties.cs
- RegexGroup.cs
- DeclaredTypeValidatorAttribute.cs
- StateItem.cs
- ReferenceService.cs
- DebugView.cs
- CacheChildrenQuery.cs
- COM2IDispatchConverter.cs
- TableItemStyle.cs
- dsa.cs
- DataRowView.cs
- SapiRecoInterop.cs
- EventRoute.cs
- PageRequestManager.cs
- ConfigurationPropertyAttribute.cs
- MissingFieldException.cs
- ContentPresenter.cs
- ProviderUtil.cs
- BadImageFormatException.cs
- EventLogEntryCollection.cs
- DynamicDataResources.Designer.cs
- WebContext.cs
- GroupLabel.cs
- SerialErrors.cs
- AspNetRouteServiceHttpHandler.cs
- ModuleBuilder.cs
- EncodingFallbackAwareXmlTextWriter.cs
- ServiceModelConfigurationSectionCollection.cs
- DoubleAnimationUsingPath.cs
- WrapPanel.cs
- SoapRpcServiceAttribute.cs
- CombinedGeometry.cs
- XmlNamedNodeMap.cs
- AnimationStorage.cs
- DbBuffer.cs
- MenuItemStyle.cs
- ElementsClipboardData.cs
- HttpCookieCollection.cs
- Enum.cs
- WindowsGraphics.cs
- SelectionRangeConverter.cs
- RankException.cs
- NativeWrapper.cs
- GeometryModel3D.cs
- X509Certificate.cs
- Tracking.cs
- ConfigurationSectionGroupCollection.cs
- GeometryValueSerializer.cs
- RectAnimationUsingKeyFrames.cs
- ViewPort3D.cs
- Helpers.cs
- LoginCancelEventArgs.cs
- SHA384Managed.cs
- MouseCaptureWithinProperty.cs
- AddInController.cs
- AssemblyAssociatedContentFileAttribute.cs
- WbemProvider.cs
- GroupLabel.cs
- DataPagerFieldCommandEventArgs.cs
- DataGridViewMethods.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- PreservationFileWriter.cs
- CodeRemoveEventStatement.cs
- ClickablePoint.cs
- Label.cs
- EntityContainerAssociationSet.cs
- GlyphInfoList.cs
- BlobPersonalizationState.cs
- KeyValuePair.cs
- HttpListenerRequest.cs
- WebPartPersonalization.cs
- HttpRequest.cs
- TypeConverterHelper.cs
- DiscriminatorMap.cs
- DeviceContext.cs
- CatalogPart.cs
- Model3DCollection.cs
- DbProviderServices.cs
- TextDecoration.cs
- ImageClickEventArgs.cs
- QilXmlReader.cs
- MD5.cs
- ValueQuery.cs
- SQLByte.cs
- TdsParserSessionPool.cs
- BindingUtils.cs
- HttpContextWrapper.cs
- TextChange.cs
- PropertyChangingEventArgs.cs
- WindowsFormsHostPropertyMap.cs
- PageBuildProvider.cs