RingBufferPlus API:RingBufferValue
RingBufferValue<T>
Namespace: RingBufferPlus
Represents acquired the value in the buffer.
public class RingBufferValue<T> : System.IDisposable
Type Parameters
T
Type of buffer.
Inheritance Object → RingBufferValue<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
Name
Name of RingBuffer.
public string Name { get; }
Property Value
Successful
Successful Acquire.
public bool Successful { get; }
Property Value
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()