Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / ChannelPoolSettings.cs / 1 / ChannelPoolSettings.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Collections.Generic; using System.ServiceModel; using System.Runtime.Serialization; using System.Xml; using System.ServiceModel.Description; using System.ServiceModel.Security; public class ChannelPoolSettings { TimeSpan idleTimeout; TimeSpan leaseTimeout; int maxOutboundChannelsPerEndpoint; public ChannelPoolSettings() { this.idleTimeout = OneWayDefaults.IdleTimeout; this.leaseTimeout = OneWayDefaults.LeaseTimeout; this.maxOutboundChannelsPerEndpoint = OneWayDefaults.MaxOutboundChannelsPerEndpoint; } ChannelPoolSettings(ChannelPoolSettings poolToBeCloned) { this.idleTimeout = poolToBeCloned.idleTimeout; this.leaseTimeout = poolToBeCloned.leaseTimeout; this.maxOutboundChannelsPerEndpoint = poolToBeCloned.maxOutboundChannelsPerEndpoint; } 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 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 MaxOutboundChannelsPerEndpoint { get { return this.maxOutboundChannelsPerEndpoint; } set { if (value <= 0) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value, SR.GetString(SR.ValueMustBePositive))); } this.maxOutboundChannelsPerEndpoint = value; } } internal ChannelPoolSettings Clone() { return new ChannelPoolSettings(this); } internal bool IsMatch(ChannelPoolSettings channelPoolSettings) { if (channelPoolSettings == null) { return false; } if (this.idleTimeout != channelPoolSettings.idleTimeout) { return false; } if (this.leaseTimeout != channelPoolSettings.leaseTimeout) { return false; } if (this.maxOutboundChannelsPerEndpoint != channelPoolSettings.maxOutboundChannelsPerEndpoint) { 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
- DataSourceHelper.cs
- XamlFrame.cs
- DesignTimeSiteMapProvider.cs
- PostBackOptions.cs
- HtmlHead.cs
- safex509handles.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- CodeValidator.cs
- PointCollection.cs
- PieceDirectory.cs
- DependencyPropertyKind.cs
- AuthorizationSection.cs
- ProxyAttribute.cs
- SectionUpdates.cs
- TextRangeAdaptor.cs
- DynamicControl.cs
- GridViewRowCollection.cs
- DesignTimeParseData.cs
- CompilerResults.cs
- CrossSiteScriptingValidation.cs
- OlePropertyStructs.cs
- UnauthorizedWebPart.cs
- UnmanagedMemoryStreamWrapper.cs
- DynamicRendererThreadManager.cs
- StringResourceManager.cs
- ParserStreamGeometryContext.cs
- Asn1Utilities.cs
- DiffuseMaterial.cs
- Rotation3D.cs
- FormViewCommandEventArgs.cs
- HeaderCollection.cs
- SqlCacheDependencySection.cs
- SecurityTokenTypes.cs
- TrackPoint.cs
- EngineSite.cs
- Converter.cs
- DataGridRow.cs
- PointHitTestResult.cs
- LinqDataSourceInsertEventArgs.cs
- FormatSettings.cs
- OleDbEnumerator.cs
- TableTextElementCollectionInternal.cs
- CuspData.cs
- ArrayWithOffset.cs
- ResponseStream.cs
- AuthenticationModuleElementCollection.cs
- IgnoreFileBuildProvider.cs
- SelectionRangeConverter.cs
- AggregateNode.cs
- FilteredXmlReader.cs
- InkCanvasAutomationPeer.cs
- dataprotectionpermission.cs
- IntSecurity.cs
- UniqueConstraint.cs
- LogStore.cs
- MobileSysDescriptionAttribute.cs
- OfTypeExpression.cs
- CountdownEvent.cs
- EditCommandColumn.cs
- ElementHost.cs
- FieldToken.cs
- RtfFormatStack.cs
- PrincipalPermission.cs
- SrgsText.cs
- UntrustedRecipientException.cs
- WS2007FederationHttpBinding.cs
- NoResizeSelectionBorderGlyph.cs
- UrlPath.cs
- IntegerValidator.cs
- BindingEntityInfo.cs
- ListViewGroup.cs
- FrameworkContentElement.cs
- OneToOneMappingSerializer.cs
- AppDomain.cs
- CodeActivityContext.cs
- UIElement.cs
- AspProxy.cs
- UnmanagedMarshal.cs
- LineVisual.cs
- RIPEMD160Managed.cs
- ScriptingProfileServiceSection.cs
- SmiContextFactory.cs
- NavigationExpr.cs
- TextOutput.cs
- ComponentManagerBroker.cs
- BitmapCache.cs
- TypeNameParser.cs
- EntityCommand.cs
- XmlUTF8TextReader.cs
- RectValueSerializer.cs
- CodeGenerator.cs
- RectKeyFrameCollection.cs
- AsyncPostBackTrigger.cs
- RegionIterator.cs
- ObjectList.cs
- followingquery.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- AnimatedTypeHelpers.cs
- WebPartConnectionsConnectVerb.cs
- XmlILOptimizerVisitor.cs