Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / System.Runtime.DurableInstancing / System / Runtime / Collections / ObjectCacheSettings.cs / 1305376 / ObjectCacheSettings.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Runtime.Collections { class ObjectCacheSettings { int cacheLimit; TimeSpan idleTimeout; TimeSpan leaseTimeout; int purgeFrequency; const int DefaultCacheLimit = 64; const int DefaultPurgeFrequency = 32; static TimeSpan DefaultIdleTimeout = TimeSpan.FromMinutes(2); static TimeSpan DefaultLeaseTimeout = TimeSpan.FromMinutes(5); public ObjectCacheSettings() { this.CacheLimit = DefaultCacheLimit; this.IdleTimeout = DefaultIdleTimeout; this.LeaseTimeout = DefaultLeaseTimeout; this.PurgeFrequency = DefaultPurgeFrequency; } ObjectCacheSettings(ObjectCacheSettings other) { this.CacheLimit = other.CacheLimit; this.IdleTimeout = other.IdleTimeout; this.LeaseTimeout = other.LeaseTimeout; this.PurgeFrequency = other.PurgeFrequency; } internal ObjectCacheSettings Clone() { return new ObjectCacheSettings(this); } public int CacheLimit { get { return this.cacheLimit; } set { Fx.Assert(value >= 0, "caller should validate cache limit is non-negative"); this.cacheLimit = value; } } public TimeSpan IdleTimeout { get { return this.idleTimeout; } set { Fx.Assert(value >= TimeSpan.Zero, "caller should validate cache limit is non-negative"); this.idleTimeout = value; } } public TimeSpan LeaseTimeout { get { return this.leaseTimeout; } set { Fx.Assert(value >= TimeSpan.Zero, "caller should validate cache limit is non-negative"); this.leaseTimeout = value; } } public int PurgeFrequency { get { return this.purgeFrequency; } set { Fx.Assert(value >= 0, "caller should validate purge frequency is non-negative"); this.purgeFrequency = 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
- CompilerGeneratedAttribute.cs
- BuildProviderUtils.cs
- XmlSchemaAll.cs
- TdsParserSafeHandles.cs
- GenericWebPart.cs
- SchemaElementDecl.cs
- DelegatingConfigHost.cs
- ObjectListTitleAttribute.cs
- XPathNodeHelper.cs
- CommonDialog.cs
- ControlEvent.cs
- FreezableOperations.cs
- SqlUtil.cs
- AddInDeploymentState.cs
- SourceItem.cs
- NamespaceMapping.cs
- PrimitiveXmlSerializers.cs
- UInt16Storage.cs
- Pair.cs
- PartialArray.cs
- PrintingPermission.cs
- Context.cs
- CngAlgorithmGroup.cs
- IntSecurity.cs
- PointKeyFrameCollection.cs
- Int32AnimationBase.cs
- XmlWhitespace.cs
- EntityDataSourceMemberPath.cs
- FileChangesMonitor.cs
- BehaviorService.cs
- ColumnBinding.cs
- InkPresenterAutomationPeer.cs
- HostProtectionException.cs
- UntrustedRecipientException.cs
- ToolboxComponentsCreatedEventArgs.cs
- ByteRangeDownloader.cs
- PassportAuthenticationModule.cs
- FixUp.cs
- DBSqlParserTable.cs
- NotImplementedException.cs
- DocumentXmlWriter.cs
- CodeRegionDirective.cs
- ThicknessConverter.cs
- SystemUnicastIPAddressInformation.cs
- XPathNavigatorReader.cs
- ApplicationCommands.cs
- StdValidatorsAndConverters.cs
- MetadataItemEmitter.cs
- FunctionDetailsReader.cs
- DeclarativeCatalogPart.cs
- DtrList.cs
- Double.cs
- AutomationProperty.cs
- xamlnodes.cs
- DPCustomTypeDescriptor.cs
- Geometry3D.cs
- UtilityExtension.cs
- PeerCollaboration.cs
- Size3D.cs
- Assembly.cs
- StyleXamlParser.cs
- Win32NamedPipes.cs
- DeflateStream.cs
- SafeRightsManagementEnvironmentHandle.cs
- WebConfigurationHostFileChange.cs
- TextTreeUndoUnit.cs
- XmlTextReader.cs
- DefaultTraceListener.cs
- InternalDispatchObject.cs
- FixedSOMTableRow.cs
- RootProfilePropertySettingsCollection.cs
- _LocalDataStore.cs
- DataBoundControl.cs
- RegisteredScript.cs
- GradientBrush.cs
- unsafeIndexingFilterStream.cs
- TemplateBindingExtension.cs
- OptimalTextSource.cs
- RegionInfo.cs
- ScalarType.cs
- CodeStatementCollection.cs
- ListViewGroup.cs
- CacheOutputQuery.cs
- DataExpression.cs
- ExtractCollection.cs
- VirtualDirectoryMapping.cs
- WorkflowCreationContext.cs
- QilSortKey.cs
- SizeChangedInfo.cs
- XNameConverter.cs
- CookieProtection.cs
- XmlDownloadManager.cs
- SkipQueryOptionExpression.cs
- FontFaceLayoutInfo.cs
- SmiSettersStream.cs
- ProtocolsConfigurationEntry.cs
- NumericUpDown.cs
- CommandSet.cs
- CLSCompliantAttribute.cs
- JavaScriptObjectDeserializer.cs