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
- TextEditorLists.cs
- LabelEditEvent.cs
- ReadOnlyHierarchicalDataSource.cs
- DragEvent.cs
- ContentType.cs
- MobileFormsAuthentication.cs
- HtmlControlAdapter.cs
- ProtocolViolationException.cs
- ContainsSearchOperator.cs
- TargetException.cs
- CharConverter.cs
- CustomErrorCollection.cs
- DesignTimeVisibleAttribute.cs
- StylusDownEventArgs.cs
- CharEntityEncoderFallback.cs
- TypedServiceOperationListItem.cs
- WindowsListViewItemStartMenu.cs
- HttpDictionary.cs
- DbDataRecord.cs
- Win32MouseDevice.cs
- Bidi.cs
- XsltArgumentList.cs
- HtmlInputCheckBox.cs
- PolyLineSegment.cs
- ServiceCredentialsElement.cs
- WebServiceData.cs
- ToolStripProgressBar.cs
- RtfToXamlLexer.cs
- ConfigPathUtility.cs
- SubMenuStyleCollectionEditor.cs
- TextEffectCollection.cs
- ExceptionHelpers.cs
- GACIdentityPermission.cs
- ApplicationGesture.cs
- MarshalDirectiveException.cs
- ProgressChangedEventArgs.cs
- CorruptingExceptionCommon.cs
- WebServiceFaultDesigner.cs
- FixedTextPointer.cs
- BrowserDefinition.cs
- ParagraphResult.cs
- FreezableDefaultValueFactory.cs
- XamlNamespaceHelper.cs
- RecordsAffectedEventArgs.cs
- DocumentViewerAutomationPeer.cs
- ImageSourceConverter.cs
- CompilationUtil.cs
- webbrowsersite.cs
- ListViewDeletedEventArgs.cs
- XamlClipboardData.cs
- ECDiffieHellman.cs
- XmlUtil.cs
- PenThreadPool.cs
- ListBox.cs
- TextSegment.cs
- UnicodeEncoding.cs
- IteratorFilter.cs
- WmlObjectListAdapter.cs
- RunWorkerCompletedEventArgs.cs
- QueryResult.cs
- ZoneMembershipCondition.cs
- ResourcesBuildProvider.cs
- EventProviderWriter.cs
- RegexRunnerFactory.cs
- ForEachDesigner.xaml.cs
- TableItemStyle.cs
- FormatterServices.cs
- TcpProcessProtocolHandler.cs
- StateMachineWorkflowInstance.cs
- IgnorePropertiesAttribute.cs
- _HeaderInfoTable.cs
- ScrollBar.cs
- ObjectDataProvider.cs
- ToolStripScrollButton.cs
- DesignBindingEditor.cs
- NamedObject.cs
- EntitySetDataBindingList.cs
- FontStyle.cs
- ProcessModelInfo.cs
- DtrList.cs
- EntityContainer.cs
- PackagePartCollection.cs
- HwndSourceKeyboardInputSite.cs
- DirectoryNotFoundException.cs
- IItemProperties.cs
- BrowserTree.cs
- Stroke.cs
- ScrollPatternIdentifiers.cs
- DataGridColumnCollection.cs
- ProcessStartInfo.cs
- DataGridViewRowCancelEventArgs.cs
- FactoryId.cs
- FontCacheLogic.cs
- Relationship.cs
- IncrementalReadDecoders.cs
- ConnectionPoint.cs
- DBDataPermissionAttribute.cs
- Inline.cs
- WorkflowRuntime.cs
- AsyncResult.cs