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
- TimeSpanValidatorAttribute.cs
- GAC.cs
- InkCollectionBehavior.cs
- BindingContext.cs
- TableRow.cs
- UInt32Converter.cs
- CacheEntry.cs
- DSACryptoServiceProvider.cs
- ListGeneralPage.cs
- EventMappingSettings.cs
- MsmqInputChannelBase.cs
- ColorAnimation.cs
- IntegerValidatorAttribute.cs
- SessionStateSection.cs
- DynamicActivity.cs
- basenumberconverter.cs
- AdRotator.cs
- ThreadAbortException.cs
- Pair.cs
- LogRestartAreaEnumerator.cs
- TextBoxBase.cs
- Metadata.cs
- CurrentTimeZone.cs
- Preprocessor.cs
- TableStyle.cs
- CaseInsensitiveComparer.cs
- KeyGesture.cs
- StandardOleMarshalObject.cs
- SafeLocalAllocation.cs
- SafeEventLogReadHandle.cs
- DataServiceRequestException.cs
- SpecularMaterial.cs
- HtmlHead.cs
- HtmlGenericControl.cs
- ResourcePermissionBase.cs
- ArraySortHelper.cs
- RedBlackList.cs
- DataGridViewLinkCell.cs
- HttpMethodConstraint.cs
- ViewStateModeByIdAttribute.cs
- CompatibleComparer.cs
- M3DUtil.cs
- VideoDrawing.cs
- Size.cs
- formatstringdialog.cs
- FormViewInsertedEventArgs.cs
- EntryPointNotFoundException.cs
- LinqDataSourceInsertEventArgs.cs
- DNS.cs
- SerialPort.cs
- AddInServer.cs
- DataControlFieldCollection.cs
- WebPart.cs
- ApplicationDirectory.cs
- RowBinding.cs
- Baml2006KeyRecord.cs
- ControlType.cs
- SuppressMergeCheckAttribute.cs
- ALinqExpressionVisitor.cs
- DrawingContextWalker.cs
- DrawingContext.cs
- ISO2022Encoding.cs
- TransportChannelListener.cs
- StringTraceRecord.cs
- XmlWrappingWriter.cs
- PaginationProgressEventArgs.cs
- ListViewInsertEventArgs.cs
- TraceListener.cs
- DictionarySectionHandler.cs
- ReturnValue.cs
- WindowsListViewItemCheckBox.cs
- NodeLabelEditEvent.cs
- EncryptedPackageFilter.cs
- ConfigurationPropertyAttribute.cs
- ObjectConverter.cs
- CodeDomDesignerLoader.cs
- ToolStripGripRenderEventArgs.cs
- Permission.cs
- ScrollItemPatternIdentifiers.cs
- TileBrush.cs
- OleDbException.cs
- DesignOnlyAttribute.cs
- ConstrainedDataObject.cs
- Command.cs
- HierarchicalDataBoundControl.cs
- TableLayout.cs
- HttpBrowserCapabilitiesWrapper.cs
- DynamicDataRoute.cs
- IdentitySection.cs
- EncoderNLS.cs
- TextTreePropertyUndoUnit.cs
- XmlQualifiedName.cs
- AsyncCodeActivity.cs
- _FixedSizeReader.cs
- PlatformNotSupportedException.cs
- MonitoringDescriptionAttribute.cs
- ISessionStateStore.cs
- HiddenField.cs
- SpellerHighlightLayer.cs
- CodeMemberField.cs