Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / NamedPipeConnectionPoolSettings.cs / 1 / NamedPipeConnectionPoolSettings.cs
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------
namespace System.ServiceModel.Channels
{
public sealed class NamedPipeConnectionPoolSettings
{
string groupName;
TimeSpan idleTimeout;
int maxOutputConnectionsPerEndpoint;
internal NamedPipeConnectionPoolSettings()
{
groupName = ConnectionOrientedTransportDefaults.ConnectionPoolGroupName;
idleTimeout = ConnectionOrientedTransportDefaults.IdleTimeout;
maxOutputConnectionsPerEndpoint = ConnectionOrientedTransportDefaults.MaxOutboundConnectionsPerEndpoint;
}
internal NamedPipeConnectionPoolSettings(NamedPipeConnectionPoolSettings namedPipe)
{
this.groupName = namedPipe.groupName;
this.idleTimeout = namedPipe.idleTimeout;
this.maxOutputConnectionsPerEndpoint = namedPipe.maxOutputConnectionsPerEndpoint;
}
public string GroupName
{
get { return this.groupName; }
set
{
if (value == null)
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("value");
this.groupName = value;
}
}
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 int MaxOutboundConnectionsPerEndpoint
{
get { return this.maxOutputConnectionsPerEndpoint; }
set
{
if (value < 0)
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value,
SR.GetString(SR.ValueMustBeNonNegative)));
this.maxOutputConnectionsPerEndpoint = value;
}
}
internal NamedPipeConnectionPoolSettings Clone()
{
return new NamedPipeConnectionPoolSettings(this);
}
internal bool IsMatch(NamedPipeConnectionPoolSettings namedPipe)
{
if (this.groupName != namedPipe.groupName)
return false;
if (this.idleTimeout != namedPipe.idleTimeout)
return false;
if (this.maxOutputConnectionsPerEndpoint != namedPipe.maxOutputConnectionsPerEndpoint)
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
- RtfControlWordInfo.cs
- XmlCharType.cs
- InkCanvasFeedbackAdorner.cs
- HtmlValidatorAdapter.cs
- SAPICategories.cs
- XomlCompilerParameters.cs
- FlowDocument.cs
- OdbcErrorCollection.cs
- nulltextcontainer.cs
- TdsValueSetter.cs
- RC2.cs
- CodeAttachEventStatement.cs
- MbpInfo.cs
- FontSource.cs
- FixedDocument.cs
- CursorInteropHelper.cs
- HTMLTagNameToTypeMapper.cs
- basenumberconverter.cs
- HttpDictionary.cs
- XmlSchemaDatatype.cs
- DrawingImage.cs
- HttpResponseInternalWrapper.cs
- GeneralTransform3DTo2D.cs
- PolicyException.cs
- GeneralTransform3DTo2DTo3D.cs
- TdsParameterSetter.cs
- DetailsViewUpdatedEventArgs.cs
- DocumentReference.cs
- SQLDecimal.cs
- WebPart.cs
- FormatterServices.cs
- LinkUtilities.cs
- CodeConstructor.cs
- MessagePropertyVariants.cs
- SectionUpdates.cs
- IteratorDescriptor.cs
- CommandSet.cs
- ClientBuildManagerCallback.cs
- RenderCapability.cs
- ToolStripDropDown.cs
- ImageListUtils.cs
- ParserStack.cs
- OverflowException.cs
- WebPartTransformer.cs
- SerializationSectionGroup.cs
- EventToken.cs
- RecognizedWordUnit.cs
- XmlSchemaInferenceException.cs
- DiscoveryInnerClientAdhoc11.cs
- EntityParameterCollection.cs
- CreateParams.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- ListBoxDesigner.cs
- LineBreak.cs
- XPathParser.cs
- RelatedImageListAttribute.cs
- CounterCreationDataCollection.cs
- ByteAnimationBase.cs
- CodeAccessPermission.cs
- SamlEvidence.cs
- DependencyObject.cs
- WebEncodingValidatorAttribute.cs
- Trigger.cs
- DataBinding.cs
- RealProxy.cs
- NodeFunctions.cs
- ListViewAutomationPeer.cs
- JournalEntryListConverter.cs
- WorkflowInstanceExtensionCollection.cs
- Int16.cs
- CompilationRelaxations.cs
- RegisteredArrayDeclaration.cs
- XamlToRtfParser.cs
- CodeSubDirectory.cs
- BasicHttpSecurityElement.cs
- EntitySqlQueryState.cs
- Expander.cs
- DataGridViewComboBoxEditingControl.cs
- ListViewDeleteEventArgs.cs
- DocumentProperties.cs
- RbTree.cs
- ChannelDispatcher.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- HotSpotCollection.cs
- LayoutInformation.cs
- AsynchronousChannel.cs
- PositiveTimeSpanValidatorAttribute.cs
- RealizationDrawingContextWalker.cs
- EntityCommandExecutionException.cs
- EntityDataSourceDataSelection.cs
- Merger.cs
- OutputCacheProfile.cs
- DbParameterHelper.cs
- ErrorTableItemStyle.cs
- TimerEventSubscriptionCollection.cs
- OracleException.cs
- ReadOnlyDataSource.cs
- ComplexTypeEmitter.cs
- XMLSyntaxException.cs
- WebPartChrome.cs