Search Results for

    Show / Hide Table of Contents

    Class LruCache<TKey, TValue>

    /// LRU Cache with disposing of disposable values.

    Inheritance
    object
    LruCache<TKey, TValue>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Mapsui.Cache
    Assembly: Mapsui.dll
    Syntax
    public class LruCache<TKey, TValue> where TKey : notnull
    Type Parameters
    Name Description
    TKey
    TValue

    Constructors

    | Edit this page View Source

    LruCache(int)

    /// LRU Cache with disposing of disposable values.

    Declaration
    public LruCache(int capacity)
    Parameters
    Type Name Description
    int capacity

    Properties

    | Edit this page View Source

    this[TKey]

    Declaration
    public TValue this[TKey key] { get; set; }
    Parameters
    Type Name Description
    TKey key
    Property Value
    Type Description
    TValue

    Methods

    | Edit this page View Source

    Clear()

    Declaration
    public void Clear()
    | Edit this page View Source

    Get(TKey)

    Declaration
    public TValue? Get(TKey key)
    Parameters
    Type Name Description
    TKey key
    Returns
    Type Description
    TValue
    | Edit this page View Source

    GetOrCreateValue<TParam, TResult>(TParam, Func<TParam, TResult>)

    Declaration
    public TResult? GetOrCreateValue<TParam, TResult>(TParam key, Func<TParam, TResult> func) where TParam : TKey where TResult : TValue
    Parameters
    Type Name Description
    TParam key
    Func<TParam, TResult> func
    Returns
    Type Description
    TResult
    Type Parameters
    Name Description
    TParam
    TResult
    | Edit this page View Source

    Put(TKey, TValue)

    Declaration
    public void Put(TKey key, TValue value)
    Parameters
    Type Name Description
    TKey key
    TValue value
    | Edit this page View Source

    TryGetValue(TKey, out TValue)

    Declaration
    public bool TryGetValue(TKey key, out TValue value)
    Parameters
    Type Name Description
    TKey key
    TValue value
    Returns
    Type Description
    bool

    Extension Methods

    DisposableExtension.DisposeIfDisposable(object?)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX