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

Provides a rolling window of data to the given size Disposing the RollingWindow immediately releases all references to items within the inner collection and renders the instance unusable from then on. More...

Inheritance diagram for PeanutButter.Utils.IRollingWindow< T >:
PeanutButter.Utils.RollingWindow< T >

Public Member Functions

void Add (T item)
 Add an item to the window, will discard any old items which exceed the configured window length.

Properties

long MaxSize [get, set]
 Get or set the maximum size for this window. If you set the MaxSize after construction to a value smaller than before and the RollingWindow is already at capacity, extraneous items will be trimmed.

Detailed Description

Provides a rolling window of data to the given size Disposing the RollingWindow immediately releases all references to items within the inner collection and renders the instance unusable from then on.

Template Parameters
T

Member Function Documentation

◆ Add()

void PeanutButter.Utils.IRollingWindow< T >.Add ( T item)

Add an item to the window, will discard any old items which exceed the configured window length.

Parameters
item

Implemented in PeanutButter.Utils.RollingWindow< T >.

Property Documentation

◆ MaxSize

long PeanutButter.Utils.IRollingWindow< T >.MaxSize
getset

Get or set the maximum size for this window. If you set the MaxSize after construction to a value smaller than before and the RollingWindow is already at capacity, extraneous items will be trimmed.

Implemented in PeanutButter.Utils.RollingWindow< T >.


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