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
- ObjectSet.cs
- Wizard.cs
- CodeBinaryOperatorExpression.cs
- DataGridViewRowCollection.cs
- RequestValidator.cs
- UserControlParser.cs
- ActivationArguments.cs
- HostedTransportConfigurationBase.cs
- OutputScope.cs
- EntityType.cs
- PersistChildrenAttribute.cs
- SrgsRulesCollection.cs
- SqlConnectionFactory.cs
- SqlServer2KCompatibilityAnnotation.cs
- WindowsFont.cs
- DocComment.cs
- XPathSelectionIterator.cs
- ReaderContextStackData.cs
- SocketManager.cs
- EnvelopedPkcs7.cs
- DataGridColumnCollection.cs
- MethodBody.cs
- EditorBrowsableAttribute.cs
- LineSegment.cs
- ObjectSecurity.cs
- RegexCompilationInfo.cs
- AutomationEvent.cs
- TypeDescriptionProviderAttribute.cs
- TemplateBaseAction.cs
- MemoryMappedFile.cs
- NativeRightsManagementAPIsStructures.cs
- AppDomainManager.cs
- WindowsAltTab.cs
- DockAndAnchorLayout.cs
- QueryCreatedEventArgs.cs
- ObjectNotFoundException.cs
- TextProperties.cs
- UnsafeCollabNativeMethods.cs
- Matrix3DStack.cs
- sqlstateclientmanager.cs
- IsolatedStorageException.cs
- PathFigure.cs
- RenderingBiasValidation.cs
- _RequestCacheProtocol.cs
- AliasGenerator.cs
- Authorization.cs
- ViewLoader.cs
- BitmapDownload.cs
- RequestResizeEvent.cs
- XmlSerializerSection.cs
- ParseElementCollection.cs
- GridViewPageEventArgs.cs
- SessionStateItemCollection.cs
- TextHidden.cs
- DynamicPhysicalDiscoSearcher.cs
- ErrorHandler.cs
- FontStyleConverter.cs
- ObjectMaterializedEventArgs.cs
- DataGridViewUtilities.cs
- RegistryConfigurationProvider.cs
- ProcessProtocolHandler.cs
- QilLiteral.cs
- FragmentQuery.cs
- SingleAnimationUsingKeyFrames.cs
- HttpApplication.cs
- SBCSCodePageEncoding.cs
- Latin1Encoding.cs
- WebRequestModuleElementCollection.cs
- DataPager.cs
- ChangeToolStripParentVerb.cs
- dataprotectionpermissionattribute.cs
- IsolatedStorageFile.cs
- NamedPipeConnectionPoolSettings.cs
- SqlTrackingWorkflowInstance.cs
- XPathNavigatorReader.cs
- FontClient.cs
- RMPublishingDialog.cs
- InternalCache.cs
- SafeRegistryHandle.cs
- FixedStringLookup.cs
- TextBoxLine.cs
- ClientOperation.cs
- PeerNameRecord.cs
- XmlEntityReference.cs
- LayoutTable.cs
- DataObjectFieldAttribute.cs
- SecurityTokenRequirement.cs
- DSASignatureFormatter.cs
- X509CertificateTokenFactoryCredential.cs
- CacheSection.cs
- PreloadedPackages.cs
- XmlToDatasetMap.cs
- ObjectSet.cs
- HtmlForm.cs
- ComContractElementCollection.cs
- OdbcEnvironmentHandle.cs
- NullableFloatAverageAggregationOperator.cs
- XamlSerializationHelper.cs
- DataServiceExpressionVisitor.cs
- RSAPKCS1KeyExchangeDeformatter.cs