Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.ServiceModel.Activities / System / ServiceModel / Activities / ChannelCacheSettings.cs / 1305376 / ChannelCacheSettings.cs
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------
namespace System.ServiceModel.Activities
{
using System.Runtime;
using System.ServiceModel;
using System.ServiceModel.Channels;
public class ChannelCacheSettings
{
TimeSpan idleTimeout;
TimeSpan leaseTimeout;
int maxItemsInCache;
internal static ChannelCacheSettings EmptyCacheSettings = new ChannelCacheSettings { MaxItemsInCache = 0 };
public ChannelCacheSettings()
{
this.idleTimeout = ChannelCacheDefaults.DefaultIdleTimeout;
this.leaseTimeout = ChannelCacheDefaults.DefaultLeaseTimeout;
this.maxItemsInCache = ChannelCacheDefaults.DefaultMaxItemsPerCache;
}
[Fx.Tag.KnownXamlExternal]
public TimeSpan IdleTimeout
{
get
{
return this.idleTimeout;
}
set
{
TimeoutHelper.ThrowIfNegativeArgument(value);
if (TimeoutHelper.IsTooLarge(value))
{
throw FxTrace.Exception.ArgumentOutOfRange("IdleTimeout", value, SR.ValueTooLarge("IdleTimeout"));
}
this.idleTimeout = value;
}
}
[Fx.Tag.KnownXamlExternal]
public TimeSpan LeaseTimeout
{
get
{
return leaseTimeout;
}
set
{
TimeoutHelper.ThrowIfNegativeArgument(value);
if (TimeoutHelper.IsTooLarge(value))
{
throw FxTrace.Exception.ArgumentOutOfRange("LeaseTimeout", value, SR.ValueTooLarge("LeaseTimeout"));
}
this.leaseTimeout = value;
}
}
public int MaxItemsInCache
{
get
{
return this.maxItemsInCache;
}
set
{
if (value < 0)
{
throw FxTrace.Exception.ArgumentOutOfRange("MaxItemsInCache", value, SR.ValueCannotBeNegative("MaxItemsInCache"));
}
this.maxItemsInCache = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PenLineCapValidation.cs
- CheckBox.cs
- XmlElementAttributes.cs
- DynamicDataManager.cs
- UntrustedRecipientException.cs
- EncryptedKey.cs
- PermissionAttributes.cs
- ViewRendering.cs
- QilDataSource.cs
- HiddenFieldPageStatePersister.cs
- OdbcInfoMessageEvent.cs
- StorageTypeMapping.cs
- SaveFileDialog.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- Msmq4SubqueuePoisonHandler.cs
- DocumentOrderQuery.cs
- PersonalizationProviderHelper.cs
- CustomPopupPlacement.cs
- ProviderConnectionPointCollection.cs
- OledbConnectionStringbuilder.cs
- MethodCallTranslator.cs
- pingexception.cs
- InternalControlCollection.cs
- CellLabel.cs
- WinFormsUtils.cs
- ScrollBarAutomationPeer.cs
- StylusButton.cs
- AmbientValueAttribute.cs
- CheckBoxList.cs
- FloatAverageAggregationOperator.cs
- OutputCacheProfileCollection.cs
- DateTimeOffsetStorage.cs
- TemplateGroupCollection.cs
- DataTableExtensions.cs
- GlobalizationAssembly.cs
- TimeoutConverter.cs
- ComponentTray.cs
- Table.cs
- DataGridViewImageColumn.cs
- MenuItem.cs
- TdsParserHelperClasses.cs
- XmlSerializationGeneratedCode.cs
- EventEntry.cs
- TraceUtils.cs
- UriSection.cs
- EdmPropertyAttribute.cs
- EmptyQuery.cs
- BitmapEffectGeneralTransform.cs
- Wrapper.cs
- ZoneLinkButton.cs
- ActivityTrace.cs
- MenuDesigner.cs
- ManifestResourceInfo.cs
- SmtpDateTime.cs
- UpdateDelegates.Generated.cs
- DuplicateMessageDetector.cs
- TreeNodeBinding.cs
- Delegate.cs
- Oid.cs
- WeakReferenceKey.cs
- CodeGenerator.cs
- CalendarDay.cs
- AsynchronousChannel.cs
- PointAnimation.cs
- DiscoveryClientProtocol.cs
- Formatter.cs
- EntitySqlQueryState.cs
- CaseStatementSlot.cs
- XmlQueryContext.cs
- _OverlappedAsyncResult.cs
- AdRotator.cs
- WebCodeGenerator.cs
- ServicesUtilities.cs
- NewExpression.cs
- ContextConfiguration.cs
- ExitEventArgs.cs
- NamedPermissionSet.cs
- StringAttributeCollection.cs
- securestring.cs
- UpdateExpressionVisitor.cs
- CellCreator.cs
- ConfigXmlDocument.cs
- Processor.cs
- RuntimeConfigLKG.cs
- OrderToken.cs
- PathFigure.cs
- MsmqSecureHashAlgorithm.cs
- RadioButtonAutomationPeer.cs
- ServiceEndpoint.cs
- HostVisual.cs
- SqlBuffer.cs
- BinHexDecoder.cs
- SchemaInfo.cs
- ConstructorNeedsTagAttribute.cs
- AssociationSetMetadata.cs
- EntityTypeBase.cs
- GeneralTransform3DGroup.cs
- ACL.cs
- PropertyCollection.cs
- SelectionBorderGlyph.cs