devlooped/Merq

Allow async enumerable stream results

kzu opened this issue · 0 comments

kzu commented

Similar to MediatR.

Perhaps: await foreach(var item in bus.ExecuteStream(...)).

Async streams is the official name of this functionality: https://learn.microsoft.com/en-us/dotnet/csharp/asynchronous-programming/generate-consume-asynchronous-stream

It's conceptually a special case of an IAsyncCommand<TResult>, but where the return type is IAsyncEnumerable<TResult>.

Adding the async suffix is unnecessary since the return type is not a Task.