Search Results for

    Show / Hide Table of Contents

    Class DictionaryPool<TKey, TValue>

    Defines a system used to store and retrieve System.Collections.Generic.Dictionary<TKey, TValue> objects.

    Inheritance
    System.Object
    DictionaryPool<TKey, TValue>
    Implements
    IPool<System.Collections.Generic.Dictionary<TKey, TValue>>
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Exiled.API.Features.Pools
    Assembly: Exiled.API.dll
    Syntax
    public class DictionaryPool<TKey, TValue> : IPool<Dictionary<TKey, TValue>>
    Type Parameters
    Name Description
    TKey

    The type of the key in the dictionary.

    TValue

    The type of the value in the dictionary.

    Properties

    | Improve this Doc View Source

    Pool

    Gets a DictionaryPool<TKey, TValue> that stores dictionaries.

    Declaration
    public static DictionaryPool<TKey, TValue> Pool { get; }
    Property Value
    Type Description
    DictionaryPool<TKey, TValue>

    Methods

    | Improve this Doc View Source

    Get()

    Rent a System.Collections.Generic.Dictionary<TKey, TValue> temporarily.

    Declaration
    public Dictionary<TKey, TValue> Get()
    Returns
    Type Description
    System.Collections.Generic.Dictionary<TKey, TValue>

    The System.Collections.Generic.Dictionary<TKey, TValue>.

    | Improve this Doc View Source

    Get(IEnumerable<KeyValuePair<TKey, TValue>>)

    Rent a System.Collections.Generic.Dictionary<TKey, TValue> temporarily. Fills it with the provided System.Collections.Generic.IEnumerable<T> of System.Collections.Generic.KeyValuePair<TKey, TValue>.

    Declaration
    public Dictionary<TKey, TValue> Get(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>> pairs

    The items to fill the dictionary with.

    Returns
    Type Description
    System.Collections.Generic.Dictionary<TKey, TValue>

    The System.Collections.Generic.Dictionary<TKey, TValue>.

    | Improve this Doc View Source

    Return(Dictionary<TKey, TValue>)

    Returns a finished System.Collections.Generic.Dictionary<TKey, TValue> to the pool, clearing all of its contents.

    Declaration
    public void Return(Dictionary<TKey, TValue> obj)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<TKey, TValue> obj

    The System.Collections.Generic.Dictionary<TKey, TValue> to return.

    | Improve this Doc View Source

    ToArrayReturn(Dictionary<TKey, TValue>)

    Returns the System.Collections.Generic.Dictionary<TKey, TValue> to the pool and returns its contents as an array.

    Declaration
    public KeyValuePair<TKey, TValue>[] ToArrayReturn(Dictionary<TKey, TValue> obj)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<TKey, TValue> obj

    The System.Collections.Generic.Dictionary<TKey, TValue> to return.

    Returns
    Type Description
    System.Collections.Generic.KeyValuePair<TKey, TValue>[]

    The contents of the returned dictionary as an array.

    Implements

    IPool<T>

    Extension Methods

    ReflectionExtensions.CopyProperties(Object, Object)

    See Also

    ListPool<T>
    HashSetPool<T>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX