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
- streamingZipPartStream.cs
- newinstructionaction.cs
- ImageMap.cs
- DocumentApplicationJournalEntryEventArgs.cs
- SqlDeflator.cs
- _NetRes.cs
- VisualBrush.cs
- PathSegment.cs
- TreeNodeCollection.cs
- StylusButtonEventArgs.cs
- XmlDomTextWriter.cs
- Operand.cs
- Serializer.cs
- PrintController.cs
- FrameSecurityDescriptor.cs
- XmlAnyElementAttributes.cs
- WindowsTooltip.cs
- WindowInteractionStateTracker.cs
- ChannelProtectionRequirements.cs
- PropertyEmitter.cs
- TrustExchangeException.cs
- XmlAttribute.cs
- ReliableSessionElement.cs
- PropertyEmitter.cs
- ObjectStateFormatter.cs
- ObfuscateAssemblyAttribute.cs
- HttpUnhandledOperationInvoker.cs
- ContentElementAutomationPeer.cs
- MyContact.cs
- ModelTreeEnumerator.cs
- XmlName.cs
- BooleanAnimationUsingKeyFrames.cs
- TextEditorSpelling.cs
- Image.cs
- TextRange.cs
- PageRanges.cs
- ProcessModelSection.cs
- ValueQuery.cs
- Vector3DValueSerializer.cs
- DeleteIndexBinder.cs
- ControlUtil.cs
- TabPanel.cs
- CollectionDataContractAttribute.cs
- SplitterEvent.cs
- SBCSCodePageEncoding.cs
- ModelFunction.cs
- ObjectDisposedException.cs
- GuidTagList.cs
- ListBoxChrome.cs
- MetadataStore.cs
- Matrix.cs
- TextSchema.cs
- Vector.cs
- SmtpNegotiateAuthenticationModule.cs
- DoWhileDesigner.xaml.cs
- AlternateView.cs
- ConfigXmlAttribute.cs
- EndOfStreamException.cs
- DirectoryInfo.cs
- SearchExpression.cs
- _NegoStream.cs
- ItemContainerGenerator.cs
- Char.cs
- FilterException.cs
- LockedAssemblyCache.cs
- OracleEncoding.cs
- CalendarTable.cs
- EmbeddedMailObjectsCollection.cs
- wgx_render.cs
- StateManager.cs
- Label.cs
- MultipleViewProviderWrapper.cs
- DataGrid.cs
- ContainerFilterService.cs
- DataObjectMethodAttribute.cs
- ListViewCommandEventArgs.cs
- EntitySqlException.cs
- propertyentry.cs
- PenContext.cs
- Int16KeyFrameCollection.cs
- CqlQuery.cs
- CursorConverter.cs
- Application.cs
- DbDataRecord.cs
- DataColumnMappingCollection.cs
- InvalidAsynchronousStateException.cs
- MultipartIdentifier.cs
- SqlDataSourceCache.cs
- TraceSwitch.cs
- SqlDataReaderSmi.cs
- AVElementHelper.cs
- View.cs
- WebBrowserUriTypeConverter.cs
- FontUnitConverter.cs
- _SecureChannel.cs
- ParserHooks.cs
- AmbientValueAttribute.cs
- EntityDataSourceWizardForm.cs
- DbConnectionStringCommon.cs
- newinstructionaction.cs