Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------ // 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
- SapiGrammar.cs
- XpsFilter.cs
- DefaultBindingPropertyAttribute.cs
- PathFigureCollectionConverter.cs
- BuildTopDownAttribute.cs
- ToggleProviderWrapper.cs
- TextMarkerSource.cs
- ManipulationInertiaStartingEventArgs.cs
- EntityTemplateUserControl.cs
- FocusManager.cs
- Translator.cs
- ThreadAttributes.cs
- ConfigXmlText.cs
- ComponentManagerBroker.cs
- GridViewCellAutomationPeer.cs
- XmlValidatingReader.cs
- CodeExpressionStatement.cs
- DBSqlParserTable.cs
- LocalValueEnumerator.cs
- HtmlControlPersistable.cs
- AsyncPostBackTrigger.cs
- VectorKeyFrameCollection.cs
- SplitterEvent.cs
- TreeBuilder.cs
- XmlIncludeAttribute.cs
- IgnoreSectionHandler.cs
- HtmlInputImage.cs
- OleCmdHelper.cs
- TreeView.cs
- AutomationElementCollection.cs
- JsonDeserializer.cs
- DefaultTraceListener.cs
- HttpException.cs
- CounterSet.cs
- TextFormattingConverter.cs
- CollectionContainer.cs
- WebDisplayNameAttribute.cs
- ModifierKeysConverter.cs
- SpinWait.cs
- TemplateApplicationHelper.cs
- LinearGradientBrush.cs
- PointHitTestResult.cs
- ToolstripProfessionalRenderer.cs
- HtmlLinkAdapter.cs
- FrameworkTemplate.cs
- FormatStringEditor.cs
- XmlSerializerAssemblyAttribute.cs
- IisHelper.cs
- XmlDataSource.cs
- DrawingBrush.cs
- baseshape.cs
- ResourceWriter.cs
- HwndAppCommandInputProvider.cs
- DataSetUtil.cs
- StreamProxy.cs
- DeploymentSection.cs
- ExpandCollapsePatternIdentifiers.cs
- RenderingBiasValidation.cs
- URI.cs
- DefaultSettingsSection.cs
- NotCondition.cs
- XmlLanguage.cs
- SchemaImporterExtension.cs
- InsufficientMemoryException.cs
- TextTreeTextBlock.cs
- Connector.cs
- ProxyDataContractResolver.cs
- HandleExceptionArgs.cs
- ObjectCloneHelper.cs
- StyleCollection.cs
- MenuItem.cs
- AuthenticationException.cs
- DeviceContexts.cs
- IndentTextWriter.cs
- regiisutil.cs
- SplineKeyFrames.cs
- SystemWebCachingSectionGroup.cs
- StrongNameUtility.cs
- MultilineStringConverter.cs
- DataObjectSettingDataEventArgs.cs
- PrefixQName.cs
- SqlDataSourceQueryEditor.cs
- XPathSingletonIterator.cs
- LinearKeyFrames.cs
- EditingCoordinator.cs
- SourceFilter.cs
- ExtractCollection.cs
- SqlVersion.cs
- SByteConverter.cs
- ConstNode.cs
- HtmlTextArea.cs
- MetaType.cs
- EmptyElement.cs
- SoapParser.cs
- smtpconnection.cs
- VariableBinder.cs
- DockPatternIdentifiers.cs
- DataGridViewRow.cs
- StyleTypedPropertyAttribute.cs
- DoubleAverageAggregationOperator.cs