IStreamPipelineBehavior<TMessage, TResult> interface
Namespace: Vitreous.Abstractions
Assembly: Vitreous.dll
Cross-cutting behavior that wraps the dispatch of a stream query. Behaviors execute before the stream is opened and can short-circuit with a Result<T> failure before any item is produced.
public interface IStreamPipelineBehavior<TMessage, TResult> where TMessage : IStreamQuery<TResult>Type Parameters
Section titled “Type Parameters”TMessage
The stream query type — must implement IStreamQuery<TResult>.
TResult
The type of each item yielded by the stream.
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.
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>>>