Interface IStreamEnumerableMessageArgumentResolver
- Namespace
- Silverback.Messaging.Subscribers.ArgumentResolvers
- Assembly
- Silverback.Core.dll
These resolvers are used to handle the message streams such as IMessageStreamEnumerable<TMessage>. The streams are basically handled as a single message by the publisher. The difference is that it is guaranteed that the subscribers are invoked from another thread, when published via PublishAsync(object, CancellationToken)/ PublishAsync<TResult>(object, CancellationToken). This is done to avoid blocking the original thread waiting for the stream to complete.
public interface IStreamEnumerableMessageArgumentResolver : IMessageArgumentResolver, IArgumentResolver
- Inherited Members
Methods
GetValue(IMessageStreamProvider, Type, IReadOnlyCollection<IMessageFilter>?)
Returns the messages stream in a shape that is compatible with the subscribed method.
ILazyArgumentValue GetValue(IMessageStreamProvider streamProvider, Type targetMessageType, IReadOnlyCollection<IMessageFilter>? filters = null)
Parameters
streamProviderIMessageStreamProviderThe IMessageStreamProvider being published.
targetMessageTypeTypeThe actual message type being declared by the subscribed method (e.g.
TMessagefor anIMessageStreamEnumerable<TMessage>).filtersIReadOnlyCollection<IMessageFilter>The filters to be applied.
Returns
- ILazyArgumentValue
The actual value to be forwarded to the subscribed method.