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
- HealthMonitoringSectionHelper.cs
- EventDescriptorCollection.cs
- localization.cs
- SecurityRuntime.cs
- OdbcHandle.cs
- UInt16Converter.cs
- GPRECTF.cs
- GestureRecognizer.cs
- ReadOnlyPropertyMetadata.cs
- TriggerAction.cs
- FileSystemWatcher.cs
- GZipStream.cs
- ExternalCalls.cs
- SqlException.cs
- RuleRef.cs
- MimeXmlReflector.cs
- ExpressionBinding.cs
- StatusBarPanel.cs
- SecurityContextTokenCache.cs
- UserControl.cs
- mediapermission.cs
- TraceLevelStore.cs
- ToolStripTextBox.cs
- ParameterCollection.cs
- GetPageNumberCompletedEventArgs.cs
- Queue.cs
- HelpEvent.cs
- TransactionManager.cs
- httpstaticobjectscollection.cs
- _ShellExpression.cs
- Link.cs
- AuthenticationModuleElement.cs
- RichTextBoxConstants.cs
- DateBoldEvent.cs
- ZoneButton.cs
- OleDbCommand.cs
- DynamicDataManager.cs
- SetterBase.cs
- GeometryGroup.cs
- GrammarBuilderPhrase.cs
- WebConfigurationHostFileChange.cs
- SystemIPv4InterfaceProperties.cs
- HijriCalendar.cs
- WebPartEventArgs.cs
- HttpContextWrapper.cs
- Compilation.cs
- VarRemapper.cs
- FormViewPagerRow.cs
- SharedMemory.cs
- WebReferencesBuildProvider.cs
- LayoutUtils.cs
- Crypto.cs
- ApplicationContext.cs
- PathData.cs
- CommonDialog.cs
- SqlConnectionStringBuilder.cs
- ToolStripSplitStackLayout.cs
- StylusPointPropertyInfoDefaults.cs
- KoreanLunisolarCalendar.cs
- MultipleViewPattern.cs
- LayoutEvent.cs
- WindowHelperService.cs
- WebPartDisplayModeEventArgs.cs
- CodeDomConfigurationHandler.cs
- ArrayTypeMismatchException.cs
- ProcessModuleCollection.cs
- ColumnPropertiesGroup.cs
- LineGeometry.cs
- FileVersion.cs
- TableChangeProcessor.cs
- XmlSchemaDatatype.cs
- XmlAtomicValue.cs
- TypedAsyncResult.cs
- IncrementalHitTester.cs
- GB18030Encoding.cs
- HandlerFactoryCache.cs
- DBSqlParserColumn.cs
- UrlAuthorizationModule.cs
- GridViewCommandEventArgs.cs
- ScrollViewerAutomationPeer.cs
- EncoderBestFitFallback.cs
- TypeHelpers.cs
- DefaultPerformanceCounters.cs
- WsiProfilesElementCollection.cs
- XmlDataLoader.cs
- BasicBrowserDialog.designer.cs
- _LocalDataStoreMgr.cs
- FillRuleValidation.cs
- Stylesheet.cs
- KnownIds.cs
- StyleTypedPropertyAttribute.cs
- Model3D.cs
- EmptyStringExpandableObjectConverter.cs
- SmiGettersStream.cs
- EventHandlersStore.cs
- ConfigurationPropertyCollection.cs
- Int16Storage.cs
- _Events.cs
- XmlLoader.cs
- DbConnectionPoolOptions.cs