Struct CircularBuffer Extends System::Collections::Generic::IReadOnlyList<T>, IReadOnlyCollection<T>
Implements an efficient circular buffer that can be appended to in both directions.
Public Methods
Appends a list of items to the end of the buffer.
Create a new buffer with the given capacity.
Create a new buffer using the given array as an internal store.
Resets the buffer's length to zero.
Indexes the buffer using absolute indices.
Return either the first element or the last element.
Release the backing array of this buffer back into an array pool.
Pops either from the start or from the end of the buffer.
Removes and returns the last element.
Removes and returns the first element.
Pushes a new item to the start or the end of the buffer.
Pushes a new item to the end of the buffer.
Pushes a new item to the start of the buffer.
Removes toRemove items from the buffer, starting at startIndex, and then inserts the toInsert items at startIndex.
Like Splice, but startIndex is an absolute index.
Like Splice, but the newly inserted items are left in an uninitialized state.
Like SpliceUninitialized, but startIndex is an absolute index.
Public Variables
Absolute index of the last item in the buffer, may be negative or greater than Length.
Absolute index of the first item in the buffer, may be negative or greater than Length.
First item in the buffer, throws if the buffer is empty.
Last item in the buffer, throws if the buffer is empty.
Number of items in the buffer.
Indexes the buffer, with index 0 being the first element.