Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / TcpConnectionPoolSettingsElement.cs / 1 / TcpConnectionPoolSettingsElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System; using System.ServiceModel; using System.ServiceModel.Channels; using System.Configuration; using System.Xml; using System.ComponentModel; public sealed partial class TcpConnectionPoolSettingsElement : ConfigurationElement { public TcpConnectionPoolSettingsElement() { } [ConfigurationProperty(ConfigurationStrings.GroupName, DefaultValue = ConnectionOrientedTransportDefaults.ConnectionPoolGroupName)] [StringValidator(MinLength = 0)] public string GroupName { get { return (string)base[ConfigurationStrings.GroupName]; } set { if (String.IsNullOrEmpty(value)) { value = String.Empty; } base[ConfigurationStrings.GroupName] = value; } } [ConfigurationProperty(ConfigurationStrings.LeaseTimeout, DefaultValue = TcpTransportDefaults.ConnectionLeaseTimeoutString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero)] public TimeSpan LeaseTimeout { get { return (TimeSpan)base[ConfigurationStrings.LeaseTimeout]; } set { base[ConfigurationStrings.LeaseTimeout] = value; } } [ConfigurationProperty(ConfigurationStrings.IdleTimeout, DefaultValue = ConnectionOrientedTransportDefaults.IdleTimeoutString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero)] public TimeSpan IdleTimeout { get { return (TimeSpan)base[ConfigurationStrings.IdleTimeout]; } set { base[ConfigurationStrings.IdleTimeout] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxOutboundConnectionsPerEndpoint, DefaultValue = ConnectionOrientedTransportDefaults.MaxOutboundConnectionsPerEndpoint)] [IntegerValidator(MinValue = 0)] public int MaxOutboundConnectionsPerEndpoint { get { return (int)base[ConfigurationStrings.MaxOutboundConnectionsPerEndpoint]; } set { base[ConfigurationStrings.MaxOutboundConnectionsPerEndpoint] = value; } } internal void ApplyConfiguration(TcpConnectionPoolSettings settings) { if (null == settings) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("settings"); } settings.GroupName = this.GroupName; settings.IdleTimeout = this.IdleTimeout; settings.LeaseTimeout = this.LeaseTimeout; settings.MaxOutboundConnectionsPerEndpoint = this.MaxOutboundConnectionsPerEndpoint; } internal void InitializeFrom(TcpConnectionPoolSettings settings) { if (null == settings) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("settings"); } this.GroupName = settings.GroupName; this.IdleTimeout = settings.IdleTimeout; this.LeaseTimeout = settings.LeaseTimeout; this.MaxOutboundConnectionsPerEndpoint = settings.MaxOutboundConnectionsPerEndpoint; } internal void CopyFrom(TcpConnectionPoolSettingsElement source) { if (source == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source"); } this.GroupName = source.GroupName; this.IdleTimeout = source.IdleTimeout; this.LeaseTimeout = source.LeaseTimeout; this.MaxOutboundConnectionsPerEndpoint = source.MaxOutboundConnectionsPerEndpoint; } } } // 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
- BamlMapTable.cs
- XmlSortKeyAccumulator.cs
- BoundPropertyEntry.cs
- GridViewSelectEventArgs.cs
- Point3DAnimationUsingKeyFrames.cs
- DataGridItemEventArgs.cs
- BufferModesCollection.cs
- PolicyVersion.cs
- EventLogEntryCollection.cs
- SqlRetyper.cs
- EmptyEnumerator.cs
- WebServiceParameterData.cs
- TypeSystem.cs
- Stroke2.cs
- ToolTip.cs
- ThrowHelper.cs
- CodeParameterDeclarationExpressionCollection.cs
- AliasGenerator.cs
- StaticExtension.cs
- ToolboxComponentsCreatedEventArgs.cs
- MarkupCompiler.cs
- ContainerParaClient.cs
- SchemaCollectionPreprocessor.cs
- IteratorFilter.cs
- DispatcherProcessingDisabled.cs
- hresults.cs
- CodeDirectionExpression.cs
- DataObjectEventArgs.cs
- PropertyRef.cs
- OpCellTreeNode.cs
- SwitchElementsCollection.cs
- SymmetricKeyWrap.cs
- Dump.cs
- InstanceCreationEditor.cs
- AutoGeneratedField.cs
- ImageFormatConverter.cs
- ParenExpr.cs
- updateconfighost.cs
- ThreadStartException.cs
- AudioDeviceOut.cs
- OLEDB_Util.cs
- StickyNoteHelper.cs
- QuadraticBezierSegment.cs
- DataControlReferenceCollection.cs
- MetaForeignKeyColumn.cs
- SqlUdtInfo.cs
- ZipIOExtraFieldZip64Element.cs
- SQLInt32.cs
- UnsafeNativeMethods.cs
- EventLog.cs
- LayoutExceptionEventArgs.cs
- SerialErrors.cs
- CodeDomSerializerBase.cs
- ToolZone.cs
- ContextMenu.cs
- ImageAutomationPeer.cs
- CodeTypeDeclarationCollection.cs
- AssemblyFilter.cs
- PropertyDescriptorGridEntry.cs
- LayoutUtils.cs
- GridPattern.cs
- UICuesEvent.cs
- ContextConfiguration.cs
- AuthenticationModuleElement.cs
- MdImport.cs
- MobileSysDescriptionAttribute.cs
- EntitySqlException.cs
- UnknownWrapper.cs
- WebPartZoneBaseDesigner.cs
- ExpressionsCollectionEditor.cs
- DataGridState.cs
- CreateUserWizard.cs
- Model3DGroup.cs
- PartialCachingControl.cs
- MultiAsyncResult.cs
- PagesChangedEventArgs.cs
- DeclaredTypeElementCollection.cs
- SqlUtil.cs
- PagerSettings.cs
- PrimitiveXmlSerializers.cs
- DoubleIndependentAnimationStorage.cs
- PathTooLongException.cs
- ElasticEase.cs
- PersonalizationStateInfo.cs
- ProxyHwnd.cs
- DummyDataSource.cs
- SqlBooleanizer.cs
- TouchFrameEventArgs.cs
- AsymmetricSignatureFormatter.cs
- AppDomainShutdownMonitor.cs
- RuntimeHandles.cs
- TreeNodeCollectionEditor.cs
- Exceptions.cs
- BridgeDataReader.cs
- BigInt.cs
- QilPatternFactory.cs
- CompoundFileIOPermission.cs
- ReferencedAssembly.cs
- WindowsStatic.cs
- WsatConfiguration.cs