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
- TableStyle.cs
- HierarchicalDataSourceIDConverter.cs
- BindingWorker.cs
- WorkflowEnvironment.cs
- EventMappingSettings.cs
- EntityCommand.cs
- Library.cs
- SimpleHandlerFactory.cs
- MarginsConverter.cs
- HttpCapabilitiesEvaluator.cs
- SessionPageStatePersister.cs
- SecurityContext.cs
- ContourSegment.cs
- InlineObject.cs
- SimpleMailWebEventProvider.cs
- ContextStaticAttribute.cs
- RelatedEnd.cs
- TrackBar.cs
- ProfileModule.cs
- ConstructorArgumentAttribute.cs
- CodeNamespaceCollection.cs
- RayHitTestParameters.cs
- UserValidatedEventArgs.cs
- WinEventWrap.cs
- ListBox.cs
- TemplatePartAttribute.cs
- ChangeBlockUndoRecord.cs
- DateTimeValueSerializer.cs
- PointConverter.cs
- WebPartDisplayModeEventArgs.cs
- Button.cs
- NotSupportedException.cs
- SchemaRegistration.cs
- QueryResultOp.cs
- ControlAdapter.cs
- HandleRef.cs
- X509WindowsSecurityToken.cs
- ZoomPercentageConverter.cs
- VarRefManager.cs
- MarginsConverter.cs
- ConfigXmlComment.cs
- TemplatePagerField.cs
- WebPartConnectionsCancelEventArgs.cs
- EntityDataReader.cs
- IndependentlyAnimatedPropertyMetadata.cs
- ProfilePropertyMetadata.cs
- Path.cs
- remotingproxy.cs
- CultureSpecificCharacterBufferRange.cs
- ParameterToken.cs
- EllipseGeometry.cs
- NamespaceCollection.cs
- ELinqQueryState.cs
- HttpPostedFileWrapper.cs
- DataGridViewAutoSizeModeEventArgs.cs
- Root.cs
- LineServicesCallbacks.cs
- WorkflowPageSetupDialog.cs
- DataKey.cs
- DeriveBytes.cs
- PartitionedStreamMerger.cs
- DBCSCodePageEncoding.cs
- TaiwanLunisolarCalendar.cs
- StringConverter.cs
- CompensatableSequenceActivity.cs
- ExpressionBindings.cs
- CustomError.cs
- XPathNavigator.cs
- QueryCacheEntry.cs
- DateTimeOffset.cs
- FocusTracker.cs
- PrimitiveXmlSerializers.cs
- SvcMapFile.cs
- ParallelEnumerableWrapper.cs
- CalendarData.cs
- TextSelectionHighlightLayer.cs
- ReplyChannelBinder.cs
- DataSourceHelper.cs
- ObjectViewQueryResultData.cs
- EnumValAlphaComparer.cs
- BrowserDefinition.cs
- XPathPatternParser.cs
- SqlServer2KCompatibilityCheck.cs
- CompareValidator.cs
- CompiledRegexRunner.cs
- FeatureSupport.cs
- EmptyEnumerator.cs
- BinHexDecoder.cs
- KeyGestureValueSerializer.cs
- RadioButtonFlatAdapter.cs
- DrawingCollection.cs
- TraceListeners.cs
- SiteMapNodeCollection.cs
- HandleValueEditor.cs
- ManipulationVelocities.cs
- QueryOpcode.cs
- Selection.cs
- ClientSideProviderDescription.cs
- SafeNativeMethods.cs
- BindUriHelper.cs