More...
|
| | SlidingWindow (int maxItems) |
| | Constructs the sliding window with a cap on maximum items.
|
| |
| | SlidingWindow (TimeSpan timeToLive) |
| | Constructs the sliding window with a cap on lifespan for items.
|
| |
| | SlidingWindow (int maxItems, TimeSpan timeToLive) |
| |
|
IEnumerator< T > | GetEnumerator () |
| |
|
void | Add (T item) |
| |
| void | Trim () |
| | Trims out stale or over-allocated items. Most useful when the collection is created with a max time to live and you'd like to get the current snapshot.
|
| |
|
void | Clear () |
| |
|
bool | Contains (T item) |
| |
|
void | CopyTo (T[] array, int arrayIndex) |
| |
|
bool | Remove (T item) |
| |
|
int | IndexOf (T item) |
| |
|
void | Insert (int index, T item) |
| |
| ISlidingWindowItem< T > | ItemAt (int index) |
| | Returns the raw item at the provided index - only really useful for diagnostics.- Parameters
-
- Returns
|
| |
|
void | RemoveAt (int index) |
| |
|
|
TimeSpan | TimeToLive [get, set] |
| | The maximum amount of time that items are kept for.
|
| |
|
int | MaxItems [get, set] |
| | The maximum number of items allowed in the window.
|
| |
| TimeSpan | MaxLifeSpan [get] |
| | The age of the oldest record in the collection.
|
| |
|
int | Count [get] |
| |
|
bool | IsReadOnly [get] |
| |
| ISlidingWindowItem< T > | First [get] |
| | Provides the first sliding window item in the collection, if available, or null.
|
| |
| ISlidingWindowItem< T > | Last [get] |
| | Provides the last sliding window item in the collection, if available, or null.
|
| |
|
T | this[int index] [get, set] |
| |
◆ SlidingWindow() [1/3]
Constructs the sliding window with a cap on maximum items.
- Parameters
-
◆ SlidingWindow() [2/3]
Constructs the sliding window with a cap on lifespan for items.
- Parameters
-
◆ SlidingWindow() [3/3]
◆ ItemAt()
◆ Trim()
Trims out stale or over-allocated items. Most useful when the collection is created with a max time to live and you'd like to get the current snapshot.
Implements PeanutButter.Utils.ISlidingWindow< T >.
◆ First
◆ Last
◆ MaxLifeSpan
The documentation for this class was generated from the following file:
- source/Utils/PeanutButter.Utils/SlidingWindow.cs