Search Results for

    Show / Hide Table of Contents

    Class ListPool<T>

    Defines a system used to store and retrieve System.Collections.Generic.List<T> objects.

    Inheritance
    System.Object
    ListPool<T>
    Implements
    IPool<System.Collections.Generic.List<T>>
    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 ListPool<T> : IPool<List<T>>
    Type Parameters
    Name Description
    T

    The type of the objects in the list.

    Properties

    | Improve this Doc View Source

    Pool

    Gets a ListPool<T> that stores lists.

    Declaration
    public static ListPool<T> Pool { get; }
    Property Value
    Type Description
    ListPool<T>

    Methods

    | Improve this Doc View Source

    Get()

    Declaration
    public List<T> Get()
    Returns
    Type Description
    System.Collections.Generic.List<T>
    | Improve this Doc View Source

    Get(IEnumerable<T>)

    Retrieves a stored object of type System.Collections.Generic.List<T>, or creates it if it does not exist. The list will be filled with all the provided items.

    Declaration
    public List<T> Get(IEnumerable<T> items)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> items

    The items to fill the list with.

    Returns
    Type Description
    System.Collections.Generic.List<T>

    The stored object, or a new object, of type System.Collections.Generic.List<T>.

    | Improve this Doc View Source

    Get(Int32)

    Retrieves a stored object of type System.Collections.Generic.List<T>, or creates it if it does not exist. The capacity of the list will be equal to or greater than capacity.

    Declaration
    public List<T> Get(int capacity)
    Parameters
    Type Name Description
    System.Int32 capacity

    The capacity of content in the System.Collections.Generic.List<T>.

    Returns
    Type Description
    System.Collections.Generic.List<T>

    The stored object, or a new object, of type System.Collections.Generic.List<T>.

    | Improve this Doc View Source

    Return(List<T>)

    Declaration
    public void Return(List<T> obj)
    Parameters
    Type Name Description
    System.Collections.Generic.List<T> obj
    | Improve this Doc View Source

    ToArrayReturn(List<T>)

    Returns the System.Collections.Generic.List<T> to the pool and returns its contents as an array.

    Declaration
    public T[] ToArrayReturn(List<T> obj)
    Parameters
    Type Name Description
    System.Collections.Generic.List<T> obj

    The System.Collections.Generic.List<T> to return.

    Returns
    Type Description
    T[]

    The contents of the returned list as an array.

    Implements

    IPool<T>

    Extension Methods

    ReflectionExtensions.CopyProperties(Object, Object)

    See Also

    DictionaryPool<TKey, TValue>
    HashSetPool<T>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX