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
- OleDbErrorCollection.cs
- ObjectDataSourceView.cs
- Image.cs
- serverconfig.cs
- TemplateBamlRecordReader.cs
- XmlSchemaChoice.cs
- IUnknownConstantAttribute.cs
- WebPartManager.cs
- ListViewItemSelectionChangedEvent.cs
- ModelFunctionTypeElement.cs
- HttpProfileGroupBase.cs
- BindingValueChangedEventArgs.cs
- MailAddress.cs
- OutputCacheSection.cs
- UpdateTranslator.cs
- KerberosRequestorSecurityToken.cs
- FunctionNode.cs
- WindowsTreeView.cs
- MailBnfHelper.cs
- InputMethodStateChangeEventArgs.cs
- Win32.cs
- DefaultShape.cs
- ServiceOperation.cs
- DbConnectionClosed.cs
- Serializer.cs
- HandleExceptionArgs.cs
- Hyperlink.cs
- XmlJsonWriter.cs
- ArrayWithOffset.cs
- ResourceLoader.cs
- Keyboard.cs
- PropertyStore.cs
- ObjectItemCachedAssemblyLoader.cs
- ActivityDesignerHighlighter.cs
- FacetDescriptionElement.cs
- SuppressMessageAttribute.cs
- GeometryModel3D.cs
- AdornerLayer.cs
- GridToolTip.cs
- TextLineResult.cs
- util.cs
- AssemblyLoader.cs
- X509CertificateValidator.cs
- ConfigDefinitionUpdates.cs
- PersonalizableAttribute.cs
- DesignerTransaction.cs
- StorageBasedPackageProperties.cs
- PrintDocument.cs
- Transform3DGroup.cs
- XmlJsonReader.cs
- XmlSchemaNotation.cs
- ExtensionDataReader.cs
- ILGenerator.cs
- ControlBuilderAttribute.cs
- TrackBar.cs
- DiscardableAttribute.cs
- XPathBuilder.cs
- TraceXPathNavigator.cs
- DiagnosticStrings.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- CharacterHit.cs
- ToolStripDropDownItem.cs
- FileStream.cs
- AutomationPatternInfo.cs
- FixedSOMGroup.cs
- BaseCollection.cs
- OperatingSystem.cs
- VariableDesigner.xaml.cs
- EnumBuilder.cs
- XmlDataLoader.cs
- CacheSection.cs
- Util.cs
- ProjectionPruner.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- ConnectionStringSettingsCollection.cs
- ModifierKeysValueSerializer.cs
- XPathSingletonIterator.cs
- ILGenerator.cs
- DataBoundControlAdapter.cs
- FullTextState.cs
- DataGridItem.cs
- RoutedEventValueSerializer.cs
- XmlWhitespace.cs
- OracleRowUpdatingEventArgs.cs
- TemplateInstanceAttribute.cs
- SecUtil.cs
- TextEmbeddedObject.cs
- HttpConfigurationContext.cs
- CodePrimitiveExpression.cs
- ImageClickEventArgs.cs
- Grammar.cs
- XPathParser.cs
- ExpressionBinding.cs
- Rfc2898DeriveBytes.cs
- DefaultTraceListener.cs
- AutoResizedEvent.cs
- _FtpControlStream.cs
- HostSecurityManager.cs
- TraceContextEventArgs.cs
- RenderContext.cs