TraceStore class
Namespace: Vitreous.DevUI.Tracing
Assembly: Vitreous.DevUI.dll
Thread-safe ring buffer that holds the last Capacity execution traces. New entries push out the oldest when the buffer is full. Optimized for a high-frequency write path and an infrequent bulk-read path (SSE replay).
public sealed class TraceStoreInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”TraceStore(int)
Section titled “ TraceStore(int)”public TraceStore(int capacity = 500)Parameters
Section titled “Parameters”capacity int
Properties
Section titled “Properties”Capacity
Section titled “ Capacity”Maximum number of traces retained. Configurable via VitreousDevUIOptions.
public int Capacity { get; }Property Value
Section titled “Property Value”Returns the number of traces currently stored.
public int Count { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Append(ExecutionTrace)
Section titled “ Append(ExecutionTrace)”Appends a trace to the ring buffer and fires TraceAdded. Thread-safe.
public void Append(ExecutionTrace trace)Parameters
Section titled “Parameters”trace ExecutionTrace
GetAll()
Section titled “ GetAll()”Returns all retained traces in chronological order (oldest first). Thread-safe snapshot — callers get a consistent view at the moment of the call.
public IReadOnlyList<ExecutionTrace> GetAll()Returns
Section titled “Returns”TraceAdded
Section titled “ TraceAdded”Event raised synchronously, on the dispatching thread, after each new trace is appended. Handlers must be fast and must not throw.
public event Action<ExecutionTrace>? TraceAdded