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
- CustomCategoryAttribute.cs
- AutoResetEvent.cs
- dsa.cs
- StructureChangedEventArgs.cs
- XpsFilter.cs
- DecoderExceptionFallback.cs
- JumpItem.cs
- TextAdaptor.cs
- newinstructionaction.cs
- UserControl.cs
- MessagePropertyFilter.cs
- EdmRelationshipRoleAttribute.cs
- UpDownBase.cs
- KeyFrames.cs
- ButtonFlatAdapter.cs
- WebPartDisplayMode.cs
- StateDesigner.cs
- ImageSource.cs
- TextTreeInsertUndoUnit.cs
- SqlBulkCopy.cs
- ToolStripAdornerWindowService.cs
- SendMailErrorEventArgs.cs
- WindowsImpersonationContext.cs
- odbcmetadatacolumnnames.cs
- TextSelection.cs
- HtmlControlPersistable.cs
- sqlpipe.cs
- XmlSchemaIdentityConstraint.cs
- FrameworkRichTextComposition.cs
- MarkedHighlightComponent.cs
- WebBrowserHelper.cs
- Int16Storage.cs
- GrammarBuilder.cs
- AttributeCollection.cs
- MimeMultiPart.cs
- EnumConverter.cs
- ParameterBuilder.cs
- RealizationContext.cs
- ProxyElement.cs
- HttpStaticObjectsCollectionWrapper.cs
- XmlSchemaGroupRef.cs
- PathTooLongException.cs
- OneWayChannelListener.cs
- DBSchemaRow.cs
- TextContainer.cs
- Attributes.cs
- CharConverter.cs
- FunctionNode.cs
- AuthenticationService.cs
- WmlObjectListAdapter.cs
- SignatureDescription.cs
- PreloadedPackages.cs
- DataSourceConverter.cs
- DependentTransaction.cs
- DodSequenceMerge.cs
- EventManager.cs
- CompressStream.cs
- CopyAction.cs
- RadioButtonRenderer.cs
- TreeView.cs
- BlurEffect.cs
- CodeDirectiveCollection.cs
- EmptyCollection.cs
- odbcmetadatafactory.cs
- CalendarDay.cs
- Int32Rect.cs
- objectresult_tresulttype.cs
- SafeFileMappingHandle.cs
- ApplicationSecurityManager.cs
- Unit.cs
- DataConnectionHelper.cs
- SvcMapFile.cs
- TempFiles.cs
- DesignerSerializationManager.cs
- EntityDesignerBuildProvider.cs
- ComAdminInterfaces.cs
- XmlArrayItemAttribute.cs
- XmlSerializationWriter.cs
- WebPartConnectionsDisconnectVerb.cs
- CommentAction.cs
- ADRoleFactory.cs
- QueryCacheEntry.cs
- AdCreatedEventArgs.cs
- MembershipValidatePasswordEventArgs.cs
- FigureParagraph.cs
- NextPreviousPagerField.cs
- IISMapPath.cs
- MemberPath.cs
- CacheAxisQuery.cs
- Util.cs
- SizeConverter.cs
- ProviderBase.cs
- SizeAnimationUsingKeyFrames.cs
- SamlAuthenticationStatement.cs
- RowParagraph.cs
- DataTableTypeConverter.cs
- WindowsImpersonationContext.cs
- Assembly.cs
- GridPattern.cs
- SspiNegotiationTokenProviderState.cs