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
- XmlSchemaElement.cs
- OdbcEnvironmentHandle.cs
- WorkflowDesigner.cs
- TemplateInstanceAttribute.cs
- WindowPatternIdentifiers.cs
- KeyValuePairs.cs
- ELinqQueryState.cs
- VirtualPathUtility.cs
- EqualityComparer.cs
- RequiredAttributeAttribute.cs
- CompositeControl.cs
- FlowLayoutSettings.cs
- DockPanel.cs
- StrokeCollectionDefaultValueFactory.cs
- CheckBoxBaseAdapter.cs
- XmlNamespaceManager.cs
- FrameworkContextData.cs
- ExpressionsCollectionEditor.cs
- XmlSchemaCollection.cs
- FilterException.cs
- Page.cs
- WebPartCatalogAddVerb.cs
- PropertyGroupDescription.cs
- SegmentInfo.cs
- XmlConvert.cs
- XMLSyntaxException.cs
- UrlMappingsSection.cs
- TextEditor.cs
- LogManagementAsyncResult.cs
- Int16Storage.cs
- PageRouteHandler.cs
- SecurityCriticalDataForSet.cs
- SchemaRegistration.cs
- HandleCollector.cs
- DataGridHelper.cs
- HostingEnvironmentWrapper.cs
- UserControl.cs
- ImageAttributes.cs
- RawUIStateInputReport.cs
- MetaTable.cs
- Calendar.cs
- MessageSmuggler.cs
- MenuBindingsEditorForm.cs
- MenuCommandService.cs
- PermissionAttributes.cs
- AuthenticatingEventArgs.cs
- WSMessageEncoding.cs
- SHA1Managed.cs
- BamlResourceSerializer.cs
- List.cs
- TextEditorMouse.cs
- SettingsPropertyValueCollection.cs
- SqlInternalConnection.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- PrinterResolution.cs
- TabControlEvent.cs
- ObjectNavigationPropertyMapping.cs
- AppSettingsSection.cs
- StorageInfo.cs
- sqlstateclientmanager.cs
- FixedNode.cs
- WrappedIUnknown.cs
- HtmlInputFile.cs
- XmlCharCheckingWriter.cs
- SoapCommonClasses.cs
- ContextMenu.cs
- HiddenField.cs
- ExternalException.cs
- MenuItemCollection.cs
- PropertyInfoSet.cs
- MimeFormReflector.cs
- PreparingEnlistment.cs
- SoapObjectInfo.cs
- GeometryDrawing.cs
- ByteStream.cs
- HandledEventArgs.cs
- TextContainerChangeEventArgs.cs
- OleDbError.cs
- XPathNodePointer.cs
- ScrollContentPresenter.cs
- HotSpotCollection.cs
- MouseActionConverter.cs
- XmlIgnoreAttribute.cs
- UIElement3DAutomationPeer.cs
- Oid.cs
- FrugalList.cs
- SubtreeProcessor.cs
- IdentityReference.cs
- PropertyPathWorker.cs
- ApplicationSecurityManager.cs
- TextFormatterHost.cs
- LocalizeDesigner.cs
- BitmapEffectGeneralTransform.cs
- TypedTableBaseExtensions.cs
- CodeIndexerExpression.cs
- webeventbuffer.cs
- TextTreePropertyUndoUnit.cs
- WebConfigurationHost.cs
- CapiSymmetricAlgorithm.cs
- RelationalExpressions.cs