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
- ResolvedKeyFrameEntry.cs
- TemplateKey.cs
- HttpClientCertificate.cs
- XmlChildNodes.cs
- DataGridColumnCollection.cs
- TextRangeEdit.cs
- XmlSchemaSimpleContentRestriction.cs
- EntityParameter.cs
- WeakKeyDictionary.cs
- WindowsRegion.cs
- ColumnMapProcessor.cs
- PageCache.cs
- Debugger.cs
- HashStream.cs
- ClientRuntime.cs
- NamedPipeConnectionPoolSettingsElement.cs
- ExtensionQuery.cs
- ConnectionProviderAttribute.cs
- BaseConfigurationRecord.cs
- CharacterHit.cs
- StaticSiteMapProvider.cs
- Line.cs
- XhtmlConformanceSection.cs
- BindingManagerDataErrorEventArgs.cs
- GenericIdentity.cs
- EntityExpressionVisitor.cs
- Pointer.cs
- ToolStripSettings.cs
- __Filters.cs
- OleDbPropertySetGuid.cs
- Annotation.cs
- XsltSettings.cs
- IsolatedStorage.cs
- DependentList.cs
- EllipseGeometry.cs
- ResourceBinder.cs
- FixedElement.cs
- BrowserCapabilitiesCompiler.cs
- CustomLineCap.cs
- DataGridViewComboBoxColumnDesigner.cs
- SymmetricAlgorithm.cs
- MergablePropertyAttribute.cs
- ResourceDictionaryCollection.cs
- CodeDomLoader.cs
- TextTreeText.cs
- Int32CollectionValueSerializer.cs
- DoubleLinkListEnumerator.cs
- KeyEventArgs.cs
- UnSafeCharBuffer.cs
- CompiledQueryCacheEntry.cs
- ExpressionParser.cs
- PanelDesigner.cs
- ProfileProvider.cs
- HMACSHA384.cs
- RemotingAttributes.cs
- UrlMappingsSection.cs
- CommentGlyph.cs
- SuppressIldasmAttribute.cs
- Paragraph.cs
- DecimalFormatter.cs
- TriggerActionCollection.cs
- MouseActionConverter.cs
- XhtmlMobileTextWriter.cs
- StoragePropertyMapping.cs
- FieldBuilder.cs
- Int16Animation.cs
- PrintPreviewControl.cs
- XmlObjectSerializerReadContextComplexJson.cs
- XmlSchemaImport.cs
- regiisutil.cs
- AvTraceDetails.cs
- ControlIdConverter.cs
- WorkflowDefinitionDispenser.cs
- LoginUtil.cs
- DaylightTime.cs
- SpellerStatusTable.cs
- KeySplineConverter.cs
- UTF8Encoding.cs
- MobileControlsSectionHelper.cs
- ScriptingScriptResourceHandlerSection.cs
- SchemaReference.cs
- NamespaceEmitter.cs
- ControlPropertyNameConverter.cs
- WeakEventTable.cs
- RecognitionResult.cs
- __ComObject.cs
- IDReferencePropertyAttribute.cs
- OracleColumn.cs
- DataObjectAttribute.cs
- BorderGapMaskConverter.cs
- DynamicActionMessageFilter.cs
- IndicCharClassifier.cs
- XmlSchemaAny.cs
- Item.cs
- FormsAuthenticationTicket.cs
- TraceUtils.cs
- Point3DCollection.cs
- MethodBody.cs
- SystemIPv6InterfaceProperties.cs
- DbProviderSpecificTypePropertyAttribute.cs