<PackageReference Include="System.ServiceModel.Primitives" Version="6.1.0" />

System.Runtime.MruCache<TKey, TValue>

class MruCache<TKey, TValue> : IDisposable
public int Count { get; }

public bool IsDisposed { get; }

public MruCache(int watermark)

public MruCache(int lowWatermark, int highWatermark)

public MruCache(int lowWatermark, int highWatermark, IEqualityComparer<TKey> comparer)

public void Add(TKey key, TValue value)

public bool AddRef()

public void Clear()

public void Dispose()

protected virtual void Dispose(bool disposing)

protected virtual void OnItemAgedOutOfCache(TValue item)

protected virtual void OnSingleItemRemoved(TValue item)

public bool Remove(TKey key)

public bool TryGetValue(TKey key, out TValue value)