StreamTracingBehavior<TMessage, TResult> class
Namespace: Vitreous.DevUI.Tracing
Assembly: Vitreous.DevUI.dll
Stream pipeline behavior that captures two traces per stream dispatch:
- An Opened trace — appended immediately when setup completes (or fails).
- A Closed trace — appended by
TracedAsyncEnumerator<T>when the enumerator is disposed, including the total item count and stream duration.
Both traces share the same StreamId. Passes straight through, recording nothing, until the developer UI is activated (see DevUIState).
public sealed class StreamTracingBehavior<TMessage, TResult> : IStreamPipelineBehavior<TMessage, TResult> where TMessage : IStreamQuery<TResult>Type Parameters
Section titled “Type Parameters”TMessage
TResult
Inheritance
Section titled “Inheritance”object ← StreamTracingBehavior<TMessage, TResult>
Implements
Section titled “Implements”IStreamPipelineBehavior<TMessage, TResult>
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”StreamTracingBehavior(TraceStore, DevUISerializer, DevUIState, VitreousDevUIOptions)
Section titled “ StreamTracingBehavior(TraceStore, DevUISerializer, DevUIState, VitreousDevUIOptions)”public StreamTracingBehavior(TraceStore store, DevUISerializer serializer, DevUIState state, VitreousDevUIOptions options)Parameters
Section titled “Parameters”store TraceStore
serializer DevUISerializer
state DevUIState
options VitreousDevUIOptions
Methods
Section titled “Methods”Handle(TMessage, StreamQueryHandlerDelegate<TMessage, TResult>, CancellationToken)
Section titled “ Handle(TMessage, StreamQueryHandlerDelegate<TMessage, TResult>, CancellationToken)”Executes this behavior step, calling next to continue the pipeline.
public ValueTask<Result<IAsyncEnumerable<TResult>>> Handle(TMessage message, StreamQueryHandlerDelegate<TMessage, TResult> next, CancellationToken ct = default)Parameters
Section titled “Parameters”message TMessage
next StreamQueryHandlerDelegate<TMessage, TResult>
Returns
Section titled “Returns”ValueTask<Result<IAsyncEnumerable<TResult>>>