Show / Hide Table of Contents

Class MemoizationCacheBase

Base class for a cache to store memoization entries for a memoized function.

Inheritance
System.Object
MemoizationCacheBase
MemoizationCacheBase<T, TResult>
Implements
IMemoizationCache
IClearable
System.IDisposable
Namespace: System.Memory
Assembly: Nuqleon.Memory.dll
Syntax
public abstract class MemoizationCacheBase : Object, IMemoizationCache, IClearable, IDisposable

Constructors

MemoizationCacheBase()

Declaration
protected MemoizationCacheBase()

Properties

Count

Gets the number of entries in the cache.

Declaration
public virtual int Count { get; }
Property Value
Type Description
System.Int32

CountCore

Gets the number of entries in the cache.

Declaration
protected abstract int CountCore { get; }
Property Value
Type Description
System.Int32

DebugView

Gets a debug view on the memoization cache.

Declaration
public virtual string DebugView { get; }
Property Value
Type Description
System.String

DebugViewCore

Gets a debug view on the memoization cache.

Declaration
protected abstract string DebugViewCore { get; }
Property Value
Type Description
System.String

Methods

CheckDisposed()

Checks whether the current instance has been disposed.

Declaration
protected void CheckDisposed()
Exceptions
Type Condition
System.ObjectDisposedException

Thrown if the instance has been disposed.

Clear()

Clears the entries in the cache.

Declaration
public virtual void Clear()

ClearCore(Boolean)

Clears the entries in the cache.

Declaration
protected abstract void ClearCore(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

Indicates whether the clear operation is triggered by a cache disposal.

Dispose()

Disposes the cache.

Declaration
public void Dispose()

Dispose(Boolean)

Disposes the cache.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

Indicates whether the dispose operation is triggered by a call to Dispose, or the finalizer.

DisposeCore()

Disposes the cache.

Declaration
protected virtual void DisposeCore()

Implements

IMemoizationCache
IClearable
System.IDisposable
In This Article
Back to top Generated by DocFX