PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.ISlidingWindow< T > Interface Template Reference

Provides an easy mechanism for a sliding window of data This collection is not thread-safe - you should add your own thread-safety as appropriate. More...

Inheritance diagram for PeanutButter.Utils.ISlidingWindow< T >:
PeanutButter.Utils.SlidingWindow< T >

Public Member Functions

ISlidingWindowItem< T > ItemAt (int index)
 Returns the raw item at the provided index - only really useful for diagnostics.
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.

Properties

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.
TimeSpan MaxLifeSpan [get]
 The age of the oldest record in the collection.

Detailed Description

Provides an easy mechanism for a sliding window of data This collection is not thread-safe - you should add your own thread-safety as appropriate.

Template Parameters
T

Member Function Documentation

◆ ItemAt()

ISlidingWindowItem< T > PeanutButter.Utils.ISlidingWindow< T >.ItemAt ( int index)

Returns the raw item at the provided index - only really useful for diagnostics.

Parameters
index
Returns

Implemented in PeanutButter.Utils.SlidingWindow< T >.

◆ Trim()

void PeanutButter.Utils.ISlidingWindow< 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.

Implemented in PeanutButter.Utils.SlidingWindow< T >.

Property Documentation

◆ First

ISlidingWindowItem<T> PeanutButter.Utils.ISlidingWindow< T >.First
get

Provides the first sliding window item in the collection, if available, or null.

Implemented in PeanutButter.Utils.SlidingWindow< T >.

◆ Last

ISlidingWindowItem<T> PeanutButter.Utils.ISlidingWindow< T >.Last
get

Provides the last sliding window item in the collection, if available, or null.

Implemented in PeanutButter.Utils.SlidingWindow< T >.

◆ MaxLifeSpan

TimeSpan PeanutButter.Utils.ISlidingWindow< T >.MaxLifeSpan
get

The age of the oldest record in the collection.

Implemented in PeanutButter.Utils.SlidingWindow< T >.


The documentation for this interface was generated from the following file:
  • source/Utils/PeanutButter.Utils/SlidingWindow.cs