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
- BehaviorDragDropEventArgs.cs
- StorageEndPropertyMapping.cs
- ResXResourceSet.cs
- InvalidAsynchronousStateException.cs
- ItemChangedEventArgs.cs
- InstalledFontCollection.cs
- _Events.cs
- nulltextnavigator.cs
- PersonalizationDictionary.cs
- DesignerTextBoxAdapter.cs
- TextEffect.cs
- WebPartsSection.cs
- XmlObjectSerializerReadContext.cs
- WindowsTooltip.cs
- EventManager.cs
- SortDescriptionCollection.cs
- DoWhile.cs
- ModelItem.cs
- ProxyFragment.cs
- CounterCreationDataCollection.cs
- ExpressionConverter.cs
- WinFormsComponentEditor.cs
- NativeMethods.cs
- objectquery_tresulttype.cs
- XPathSingletonIterator.cs
- GridEntryCollection.cs
- RegexTree.cs
- ColorContext.cs
- CustomPopupPlacement.cs
- BitmapEffectInputData.cs
- ThemeInfoAttribute.cs
- TextCompositionManager.cs
- Context.cs
- parserscommon.cs
- SchemaSetCompiler.cs
- SamlSecurityToken.cs
- XmlSerializationReader.cs
- StringBuilder.cs
- _TimerThread.cs
- QilDataSource.cs
- SqlConnectionHelper.cs
- UnsettableComboBox.cs
- ToolStrip.cs
- Psha1DerivedKeyGenerator.cs
- Bits.cs
- UnsafeNativeMethods.cs
- WaitForChangedResult.cs
- DataRelationPropertyDescriptor.cs
- NativeMethods.cs
- BuildProviderCollection.cs
- SelectionProcessor.cs
- IndexedEnumerable.cs
- AppSettingsExpressionBuilder.cs
- QuaternionConverter.cs
- DirectoryInfo.cs
- BrushValueSerializer.cs
- SqlDependency.cs
- ActivityWithResult.cs
- RegionData.cs
- WebPartDisplayModeEventArgs.cs
- FacetValues.cs
- ObjectSelectorEditor.cs
- InvalidCommandTreeException.cs
- ConnectionConsumerAttribute.cs
- Point4DConverter.cs
- QualifiedCellIdBoolean.cs
- BrushConverter.cs
- SerializationInfoEnumerator.cs
- keycontainerpermission.cs
- QueryContinueDragEvent.cs
- CompareValidator.cs
- SmtpClient.cs
- WsdlBuildProvider.cs
- EnumerableRowCollectionExtensions.cs
- TextTreeText.cs
- Visual3DCollection.cs
- PhonemeEventArgs.cs
- SettingsPropertyIsReadOnlyException.cs
- SymmetricAlgorithm.cs
- DataGridRow.cs
- MetadataArtifactLoader.cs
- WebPartEditorApplyVerb.cs
- xmlfixedPageInfo.cs
- HttpHandlersSection.cs
- TraceContextEventArgs.cs
- TagNameToTypeMapper.cs
- Parameter.cs
- DataPagerFieldItem.cs
- SettingsAttributes.cs
- DataListCommandEventArgs.cs
- KeyValueInternalCollection.cs
- CodeAttributeArgument.cs
- Material.cs
- ProcessStartInfo.cs
- SafeLibraryHandle.cs
- WindowsGraphics.cs
- DragSelectionMessageFilter.cs
- FileClassifier.cs
- FrameworkElementFactoryMarkupObject.cs
- Pool.cs