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] |
◆ ItemAt()
ISlidingWindowItem< T > PeanutButter.Utils.SlidingWindow< T >.ItemAt |
( |
int | index | ) |
|
◆ SlidingWindow() [1/3]
PeanutButter.Utils.SlidingWindow< T >.SlidingWindow |
( |
int | maxItems | ) |
|
Constructs the sliding window with a cap on maximum items.
- Parameters
-
◆ SlidingWindow() [2/3]
PeanutButter.Utils.SlidingWindow< T >.SlidingWindow |
( |
int | maxItems, |
|
|
TimeSpan | timeToLive ) |
◆ SlidingWindow() [3/3]
PeanutButter.Utils.SlidingWindow< T >.SlidingWindow |
( |
TimeSpan | timeToLive | ) |
|
Constructs the sliding window with a cap on lifespan for items.
- Parameters
-
◆ Trim()
void PeanutButter.Utils.SlidingWindow< T >.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
ISlidingWindowItem<T> PeanutButter.Utils.SlidingWindow< T >.First |
|
get |
◆ Last
ISlidingWindowItem<T> PeanutButter.Utils.SlidingWindow< T >.Last |
|
get |
◆ MaxLifeSpan
TimeSpan PeanutButter.Utils.SlidingWindow< T >.MaxLifeSpan |
|
get |
The documentation for this class was generated from the following file:
- source/Utils/PeanutButter.Utils/SlidingWindow.cs