BoundedList<T>

public sealed class BoundedList<T>
A list with a capped capacity which throws away the oldest element when newly added elements would cause a capacity overrun. This collection is threadsafe.
T

Constructors

BoundedList

#
public BoundedList(
capacity
)

Properties

Capacity

#
Gets the maximum capacity of this collection.
public int Capacity { get; }

Count

#
Gets the total number of elements currently in this collection.
public int Count { get; }

Indexers

this[]

#
public T this[
index
] { get; }

Methods

Add

#
Add a new element in the most important slot in this collection.
public void Add(
T
item
)

MoveToFront

#
Move the item at the given index to the front of the list.
public void MoveToFront(
index
)

Remove

#
Remove the element at the given index.
public void Remove(
T
item
)