ISender interface
Namespace: Vitreous.Abstractions
Assembly: Vitreous.dll
Dispatches commands and queries to their registered handlers, executing any registered pipeline behaviors along the way.
public interface ISenderExtension Methods
Section titled “Extension Methods”StreamQueryExtensions.CollectStream<TResult>(ISender, IStreamQuery<TResult>, CancellationToken)
Methods
Section titled “Methods”CreateStream<TResult>(IStreamQuery<TResult>, CancellationToken)
Section titled “ CreateStream<TResult>(IStreamQuery<TResult>, CancellationToken)”Opens a stream query and returns a lazy sequence of TResult items.
The Result<T> wrapper allows setup failures (validation, authorization) to be
signalled before any item is produced. Once the stream is open, items flow as plain
TResult.
ValueTask<Result<IAsyncEnumerable<TResult>>> CreateStream<TResult>(IStreamQuery<TResult> query, CancellationToken ct = default)Parameters
Section titled “Parameters”query IStreamQuery<TResult>
Returns
Section titled “Returns”ValueTask<Result<IAsyncEnumerable<TResult>>>
Type Parameters
Section titled “Type Parameters”TResult
Send<TResult>(ICommand<TResult>, CancellationToken)
Section titled “ Send<TResult>(ICommand<TResult>, CancellationToken)”Sends a command that returns a value of type TResult.
ValueTask<Result<TResult>> Send<TResult>(ICommand<TResult> command, CancellationToken ct = default)Parameters
Section titled “Parameters”command ICommand<TResult>
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”TResult
Send(ICommand, CancellationToken)
Section titled “ Send(ICommand, CancellationToken)”Sends a command that does not return a meaningful value.
ValueTask<Result> Send(ICommand command, CancellationToken ct = default)Parameters
Section titled “Parameters”command ICommand
Returns
Section titled “Returns”Send<TResult>(IQuery<TResult>, CancellationToken)
Section titled “ Send<TResult>(IQuery<TResult>, CancellationToken)”Sends a query that returns a value of type TResult.
ValueTask<Result<TResult>> Send<TResult>(IQuery<TResult> query, CancellationToken ct = default)Parameters
Section titled “Parameters”query IQuery<TResult>
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”TResult