Skip to the content.

RingBufferPlus API:RingBufferValue

Build License NuGet Downloads

Back to List Api

RingBufferValue<T>

Namespace: RingBufferPlus

Represents acquired the value in the buffer.

public class RingBufferValue<T> : System.IDisposable

Type Parameters

T
Type of buffer.

Inheritance ObjectRingBufferValue<T>
Implements IDisposable

Properties

Current

The buffer value.

public T Current { get; }

Property Value

T

ElapsedTime

Elapsed time to acquire the value.

public TimeSpan ElapsedTime { get; }

Property Value

TimeSpan

Name

Name of RingBuffer.

public string Name { get; }

Property Value

String

Successful

Successful Acquire.

public bool Successful { get; }

Property Value

Boolean

Constructors

RingBufferValue(String, TimeSpan, Boolean, T, Action<RingBufferValue<T>>)

Create RingBufferValue.

public RingBufferValue(string name, TimeSpan elapsedTime, bool succeeded, T value, Action<RingBufferValue<T>> turnback)

Parameters

name String
Name of RingBuffer.

elapsedTime TimeSpan
Elapsed time to acquire the value.

succeeded Boolean
Successful Acquire.

value T
The buffer value.

turnback Action<RingBufferValue<T>>
The action handler to turn back buffer when disposed.

Methods

Dispose(Boolean)

Turnback value to buffer.

protected void Dispose(bool disposing)

Parameters

disposing Boolean
Disposing.

Dispose()

Turnback value to buffer.

public void Dispose()

Invalidate()

Invalidates the return of the value to the buffer. Another instance will be created.
This command will be ignored if the return was unsuccessful.

public void Invalidate()

Back to List Api