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
- CompiledQueryCacheKey.cs
- NoPersistProperty.cs
- UnsafeNativeMethods.cs
- HandlerMappingMemo.cs
- PopupEventArgs.cs
- ClientSettingsStore.cs
- ConfigurationErrorsException.cs
- Number.cs
- RegexCapture.cs
- LogEntrySerialization.cs
- HtmlInputReset.cs
- TextRenderingModeValidation.cs
- ToolStripLocationCancelEventArgs.cs
- ErrorEventArgs.cs
- WasAdminWrapper.cs
- SessionStateContainer.cs
- LambdaCompiler.Lambda.cs
- KoreanLunisolarCalendar.cs
- GeneralTransform3D.cs
- RemotingException.cs
- ConnectionInterfaceCollection.cs
- OracleBoolean.cs
- URL.cs
- XmlUTF8TextWriter.cs
- Version.cs
- RemotingConfiguration.cs
- PassportPrincipal.cs
- CacheSection.cs
- CreateCardRequest.cs
- PartitionResolver.cs
- __Filters.cs
- RegionData.cs
- LinearGradientBrush.cs
- DSGeneratorProblem.cs
- SqlTypeSystemProvider.cs
- StringConverter.cs
- DynamicMetaObjectBinder.cs
- LocalBuilder.cs
- ToolStripSplitButton.cs
- ProjectionQueryOptionExpression.cs
- XPathDocumentNavigator.cs
- DiscoveryVersion.cs
- LayoutEngine.cs
- CopyAction.cs
- TreeNodeClickEventArgs.cs
- VScrollProperties.cs
- ClientFormsAuthenticationCredentials.cs
- QueryStoreStatusRequest.cs
- DocumentCollection.cs
- DataPagerFieldItem.cs
- FolderBrowserDialog.cs
- HttpDigestClientElement.cs
- ListViewSelectEventArgs.cs
- ImmutableAssemblyCacheEntry.cs
- RenderDataDrawingContext.cs
- AnnotationHelper.cs
- BrowserTree.cs
- Style.cs
- NumericUpDownAcceleration.cs
- PageRanges.cs
- RangeValuePatternIdentifiers.cs
- TextureBrush.cs
- PersistenceException.cs
- QueueProcessor.cs
- MultiView.cs
- GridViewColumnCollection.cs
- XmlSerializerSection.cs
- InputManager.cs
- ColumnMapVisitor.cs
- EntityType.cs
- xmlfixedPageInfo.cs
- SrgsRuleRef.cs
- TreeIterator.cs
- KnowledgeBase.cs
- RenderingBiasValidation.cs
- GrammarBuilderDictation.cs
- SqlProviderUtilities.cs
- LocationUpdates.cs
- EntityFunctions.cs
- RequestCacheValidator.cs
- XmlSerializerSection.cs
- AvtEvent.cs
- UiaCoreProviderApi.cs
- InkCanvasAutomationPeer.cs
- ToolStripItemCollection.cs
- ProvideValueServiceProvider.cs
- _StreamFramer.cs
- _ProxyChain.cs
- DisplayInformation.cs
- OSFeature.cs
- DynamicDataManager.cs
- XmlWriterTraceListener.cs
- WebPartZoneAutoFormat.cs
- InputBuffer.cs
- DateTimePicker.cs
- GridViewCellAutomationPeer.cs
- InternalRelationshipCollection.cs
- TreeNodeBindingCollection.cs
- ImageIndexConverter.cs
- WebPartVerbCollection.cs