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
- SerializationSectionGroup.cs
- ProcessProtocolHandler.cs
- TimeoutException.cs
- ArgumentsParser.cs
- WebBrowserBase.cs
- TrayIconDesigner.cs
- KeyFrames.cs
- QueryNode.cs
- SparseMemoryStream.cs
- WeakRefEnumerator.cs
- DataGridViewColumnCollectionDialog.cs
- ExtenderControl.cs
- RowToFieldTransformer.cs
- CultureInfoConverter.cs
- TdsRecordBufferSetter.cs
- TextRangeAdaptor.cs
- WebScriptEnablingElement.cs
- BaseDataListComponentEditor.cs
- ServiceEndpoint.cs
- ProfilePropertySettingsCollection.cs
- MultiSelectRootGridEntry.cs
- UnmanagedBitmapWrapper.cs
- SymmetricKeyWrap.cs
- Single.cs
- XmlReflectionMember.cs
- SmtpSection.cs
- AutomationPattern.cs
- ExpressionPrinter.cs
- ContentDisposition.cs
- ObjectDisposedException.cs
- IpcChannelHelper.cs
- Crypto.cs
- UriScheme.cs
- NetCodeGroup.cs
- CodeCompileUnit.cs
- Vector3DCollectionConverter.cs
- CacheRequest.cs
- ButtonColumn.cs
- WorkflowInstanceExtensionManager.cs
- CommentAction.cs
- DataGridViewDataErrorEventArgs.cs
- FormatterConverter.cs
- VirtualizedCellInfoCollection.cs
- DefaultPrintController.cs
- QuaternionValueSerializer.cs
- CompiledRegexRunner.cs
- CodeParameterDeclarationExpressionCollection.cs
- CodeIterationStatement.cs
- SynchronizationLockException.cs
- RegistryKey.cs
- EntityClientCacheEntry.cs
- TraceEventCache.cs
- TableRow.cs
- EventMappingSettings.cs
- FileInfo.cs
- PointAnimationUsingPath.cs
- MultiBindingExpression.cs
- List.cs
- ExtendedProperty.cs
- DefaultBinder.cs
- WebReferencesBuildProvider.cs
- TreeNodeEventArgs.cs
- PropertyValueChangedEvent.cs
- DBPropSet.cs
- StyleXamlTreeBuilder.cs
- MarshalDirectiveException.cs
- UpdateTranslator.cs
- HostingEnvironmentSection.cs
- PolyBezierSegmentFigureLogic.cs
- AdRotator.cs
- MulticastNotSupportedException.cs
- Misc.cs
- DesignerTransactionCloseEvent.cs
- InstanceKeyCollisionException.cs
- NamedPermissionSet.cs
- ImageSource.cs
- MatrixValueSerializer.cs
- FrameworkObject.cs
- BitmapEffect.cs
- LocalizableResourceBuilder.cs
- OdbcConnectionString.cs
- ObjectListTitleAttribute.cs
- HttpCookie.cs
- SynchronizedCollection.cs
- GroupBoxRenderer.cs
- SortedList.cs
- Thread.cs
- SchemaImporterExtensionsSection.cs
- WindowsListBox.cs
- SystemParameters.cs
- DataBindingCollection.cs
- SplitterPanel.cs
- DataGridCell.cs
- XmlDataCollection.cs
- EncodingNLS.cs
- ConfigErrorGlyph.cs
- Comparer.cs
- TrackingParameters.cs
- CompositionTarget.cs
- RoleManagerEventArgs.cs