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
- ProfileGroupSettingsCollection.cs
- PolyBezierSegment.cs
- SrgsSemanticInterpretationTag.cs
- FixedTextView.cs
- ServiceContractAttribute.cs
- Point3D.cs
- AssemblyCache.cs
- ManagementBaseObject.cs
- LoginCancelEventArgs.cs
- SchemaImporter.cs
- TextParagraph.cs
- TextRunTypographyProperties.cs
- IsolationInterop.cs
- DSASignatureFormatter.cs
- SortDescription.cs
- WorkflowMarkupSerializationException.cs
- DelegatingConfigHost.cs
- HtmlSelect.cs
- DependencyObject.cs
- ErrorFormatterPage.cs
- DbProviderFactoriesConfigurationHandler.cs
- URIFormatException.cs
- WeakReferenceList.cs
- OutputScope.cs
- AdornerLayer.cs
- documentsequencetextcontainer.cs
- GridViewEditEventArgs.cs
- ProxyWebPartManager.cs
- SpinWait.cs
- OleDbSchemaGuid.cs
- DoubleConverter.cs
- KeyConverter.cs
- HostSecurityManager.cs
- Control.cs
- InertiaExpansionBehavior.cs
- MatrixAnimationUsingKeyFrames.cs
- IndexerHelper.cs
- TypeListConverter.cs
- ViewStateException.cs
- Root.cs
- GridItemPatternIdentifiers.cs
- XmlWrappingReader.cs
- XmlTextAttribute.cs
- PartialClassGenerationTaskInternal.cs
- XmlSchemaSequence.cs
- DataGridViewCellMouseEventArgs.cs
- BindingValueChangedEventArgs.cs
- GeometryDrawing.cs
- LZCodec.cs
- CanExecuteRoutedEventArgs.cs
- BmpBitmapDecoder.cs
- PropertyValueUIItem.cs
- _ProxyRegBlob.cs
- VariableAction.cs
- BaseTemplateParser.cs
- CursorInteropHelper.cs
- AttachedPropertiesService.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- LeaseManager.cs
- MouseCaptureWithinProperty.cs
- SafeNativeMethodsMilCoreApi.cs
- HttpBrowserCapabilitiesWrapper.cs
- Overlapped.cs
- PropertiesTab.cs
- ExpressionBuilder.cs
- RoleService.cs
- propertyentry.cs
- EventLogEntryCollection.cs
- CookieHandler.cs
- XmlWrappingWriter.cs
- BinaryWriter.cs
- InputLangChangeEvent.cs
- Help.cs
- Crc32.cs
- EntityDataSourceViewSchema.cs
- CapacityStreamGeometryContext.cs
- IdnElement.cs
- StorageBasedPackageProperties.cs
- ExceptionList.cs
- ObservableCollection.cs
- MDIClient.cs
- Rect.cs
- CuspData.cs
- ParserExtension.cs
- EventProxy.cs
- ErrorStyle.cs
- BuildProvider.cs
- Hyperlink.cs
- JsonFormatGeneratorStatics.cs
- Operators.cs
- listitem.cs
- SHA384Managed.cs
- RoleServiceManager.cs
- BitHelper.cs
- Italic.cs
- XmlSecureResolver.cs
- MatrixCamera.cs
- SecondaryIndexDefinition.cs
- ConfigXmlComment.cs
- HttpContextServiceHost.cs