Class IntegrationPublisherExtensions
- Namespace
- Silverback.Messaging.Publishing
- Assembly
- Silverback.Integration.dll
Adds the WrapAndPublish,WrapAndPublishBatch, WrapAndPublishAsync, and WrapAndPublishBatchAsync methods
to the IPublisher interface.
public static class IntegrationPublisherExtensions
- Inheritance
-
IntegrationPublisherExtensions
- Inherited Members
Methods
WrapAndPublishAsync<TMessage>(IPublisher, TMessage?, Action<IOutboundEnvelope<TMessage>>?, CancellationToken)
Wraps the message in an IOutboundEnvelope<TMessage> and publishes it.
public static Task WrapAndPublishAsync<TMessage>(this IPublisher publisher, TMessage? message, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messageTMessageThe message to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>>An optional action that can be used to configure the envelope.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TMessageThe type of the message to be published.
WrapAndPublishAsync<TMessage>(IPublisher, TMessage?, CancellationToken)
Wraps the message in an IOutboundEnvelope<TMessage> and publishes it.
public static Task WrapAndPublishAsync<TMessage>(this IPublisher publisher, TMessage? message, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messageTMessageThe message to be published.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TMessageThe type of the message to be published.
WrapAndPublishAsync<TMessage, TArgument>(IPublisher, TMessage?, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument, CancellationToken)
Wraps the message in an IOutboundEnvelope<TMessage> and publishes it.
public static Task WrapAndPublishAsync<TMessage, TArgument>(this IPublisher publisher, TMessage? message, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messageTMessageThe message to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
envelopeConfigurationAction.cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TMessageThe type of the message to be published.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.
WrapAndPublishBatchAsync<TMessage>(IPublisher, IAsyncEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>>?, CancellationToken)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TMessage>(this IPublisher publisher, IAsyncEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIAsyncEnumerable<TMessage>The messages to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>>An optional action that can be used to configure the envelopes.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TMessageThe type of the messages to be published.
WrapAndPublishBatchAsync<TMessage>(IPublisher, IAsyncEnumerable<TMessage?>, CancellationToken)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TMessage>(this IPublisher publisher, IAsyncEnumerable<TMessage?> messages, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIAsyncEnumerable<TMessage>The messages to be published.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TMessageThe type of the messages to be published.
WrapAndPublishBatchAsync<TMessage>(IPublisher, IEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>>?, CancellationToken)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TMessage>(this IPublisher publisher, IEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIEnumerable<TMessage>The messages to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>>An optional action that can be used to configure the envelopes.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TMessageThe type of the messages to be published.
WrapAndPublishBatchAsync<TMessage>(IPublisher, IEnumerable<TMessage?>, CancellationToken)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TMessage>(this IPublisher publisher, IEnumerable<TMessage?> messages, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIEnumerable<TMessage>The messages to be published.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TMessageThe type of the messages to be published.
WrapAndPublishBatchAsync<TMessage>(IPublisher, IReadOnlyCollection<TMessage?>, Action<IOutboundEnvelope<TMessage>>?, CancellationToken)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TMessage>(this IPublisher publisher, IReadOnlyCollection<TMessage?> messages, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIReadOnlyCollection<TMessage>The messages to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>>An optional action that can be used to configure the envelopes.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TMessageThe type of the messages to be published.
WrapAndPublishBatchAsync<TMessage>(IPublisher, IReadOnlyCollection<TMessage?>, CancellationToken)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TMessage>(this IPublisher publisher, IReadOnlyCollection<TMessage?> messages, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIReadOnlyCollection<TMessage>The messages to be published.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TMessageThe type of the messages to be published.
WrapAndPublishBatchAsync<TMessage, TArgument>(IPublisher, IAsyncEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument, CancellationToken)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TMessage, TArgument>(this IPublisher publisher, IAsyncEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIAsyncEnumerable<TMessage>The messages to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
envelopeConfigurationAction.cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TMessageThe type of the messages to be published.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.
WrapAndPublishBatchAsync<TSource, TMessage>(IPublisher, IAsyncEnumerable<TSource>, Func<TSource, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource>?, CancellationToken)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TSource, TMessage>(this IPublisher publisher, IAsyncEnumerable<TSource> sources, Func<TSource, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIAsyncEnumerable<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TMessage>The function used to map the source objects to messages.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TSource>An optional action that can be used to configure the envelopes.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
WrapAndPublishBatchAsync<TSource, TMessage>(IPublisher, IAsyncEnumerable<TSource>, Func<TSource, TMessage?>, CancellationToken)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TSource, TMessage>(this IPublisher publisher, IAsyncEnumerable<TSource> sources, Func<TSource, TMessage?> mapperFunction, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIAsyncEnumerable<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TMessage>The function used to map the source objects to messages.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
WrapAndPublishBatchAsync<TMessage, TArgument>(IPublisher, IEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument, CancellationToken)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TMessage, TArgument>(this IPublisher publisher, IEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIEnumerable<TMessage>The messages to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
envelopeConfigurationAction.cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TMessageThe type of the messages to be published.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.
WrapAndPublishBatchAsync<TSource, TMessage>(IPublisher, IEnumerable<TSource>, Func<TSource, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource>?, CancellationToken)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TSource, TMessage>(this IPublisher publisher, IEnumerable<TSource> sources, Func<TSource, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIEnumerable<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TMessage>The function used to map the source objects to messages.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TSource>An optional action that can be used to configure the envelopes.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
WrapAndPublishBatchAsync<TSource, TMessage>(IPublisher, IEnumerable<TSource>, Func<TSource, TMessage?>, CancellationToken)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TSource, TMessage>(this IPublisher publisher, IEnumerable<TSource> sources, Func<TSource, TMessage?> mapperFunction, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIEnumerable<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TMessage>The function used to map the source objects to messages.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
WrapAndPublishBatchAsync<TMessage, TArgument>(IPublisher, IReadOnlyCollection<TMessage?>, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument, CancellationToken)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TMessage, TArgument>(this IPublisher publisher, IReadOnlyCollection<TMessage?> messages, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIReadOnlyCollection<TMessage>The messages to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
envelopeConfigurationAction.cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TMessageThe type of the messages to be published.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.
WrapAndPublishBatchAsync<TSource, TMessage>(IPublisher, IReadOnlyCollection<TSource>, Func<TSource, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource>?, CancellationToken)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TSource, TMessage>(this IPublisher publisher, IReadOnlyCollection<TSource> sources, Func<TSource, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIReadOnlyCollection<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TMessage>The function used to map the source objects to messages.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TSource>An optional action that can be used to configure the envelopes.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
WrapAndPublishBatchAsync<TSource, TMessage>(IPublisher, IReadOnlyCollection<TSource>, Func<TSource, TMessage?>, CancellationToken)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TSource, TMessage>(this IPublisher publisher, IReadOnlyCollection<TSource> sources, Func<TSource, TMessage?> mapperFunction, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIReadOnlyCollection<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TMessage>The function used to map the source objects to messages.
cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
WrapAndPublishBatchAsync<TSource, TMessage, TArgument>(IPublisher, IAsyncEnumerable<TSource>, Func<TSource, TArgument, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource, TArgument>, TArgument, CancellationToken)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TSource, TMessage, TArgument>(this IPublisher publisher, IAsyncEnumerable<TSource> sources, Func<TSource, TArgument, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIAsyncEnumerable<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TArgument, TMessage>The function used to map the source objects to messages.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TSource, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
mapperFunctionand theenvelopeConfigurationAction.cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.
WrapAndPublishBatchAsync<TSource, TMessage, TArgument>(IPublisher, IEnumerable<TSource>, Func<TSource, TArgument, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource, TArgument>, TArgument, CancellationToken)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TSource, TMessage, TArgument>(this IPublisher publisher, IEnumerable<TSource> sources, Func<TSource, TArgument, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIEnumerable<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TArgument, TMessage>The function used to map the source objects to messages.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TSource, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
mapperFunctionand theenvelopeConfigurationAction.cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.
WrapAndPublishBatchAsync<TSource, TMessage, TArgument>(IPublisher, IReadOnlyCollection<TSource>, Func<TSource, TArgument, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource, TArgument>, TArgument, CancellationToken)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static Task WrapAndPublishBatchAsync<TSource, TMessage, TArgument>(this IPublisher publisher, IReadOnlyCollection<TSource> sources, Func<TSource, TArgument, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIReadOnlyCollection<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TArgument, TMessage>The function used to map the source objects to messages.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TSource, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
mapperFunctionand theenvelopeConfigurationAction.cancellationTokenCancellationTokenThe CancellationToken that can be used to cancel the operation.
Returns
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.
WrapAndPublishBatch<TMessage>(IPublisher, IAsyncEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>>?)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static void WrapAndPublishBatch<TMessage>(this IPublisher publisher, IAsyncEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction = null) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIAsyncEnumerable<TMessage>The messages to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>>An optional action that can be used to configure the envelopes.
Type Parameters
TMessageThe type of the messages to be published.
WrapAndPublishBatch<TMessage>(IPublisher, IEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>>?)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static void WrapAndPublishBatch<TMessage>(this IPublisher publisher, IEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction = null) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIEnumerable<TMessage>The messages to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>>An optional action that can be used to configure the envelopes.
Type Parameters
TMessageThe type of the messages to be published.
WrapAndPublishBatch<TMessage>(IPublisher, IReadOnlyCollection<TMessage?>, Action<IOutboundEnvelope<TMessage>>?)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static void WrapAndPublishBatch<TMessage>(this IPublisher publisher, IReadOnlyCollection<TMessage?> messages, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction = null) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIReadOnlyCollection<TMessage>The messages to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>>An optional action that can be used to configure the envelopes.
Type Parameters
TMessageThe type of the messages to be published.
WrapAndPublishBatch<TMessage, TArgument>(IPublisher, IAsyncEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static void WrapAndPublishBatch<TMessage, TArgument>(this IPublisher publisher, IAsyncEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIAsyncEnumerable<TMessage>The messages to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
envelopeConfigurationAction.
Type Parameters
TMessageThe type of the messages to be published.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.
WrapAndPublishBatch<TSource, TMessage>(IPublisher, IAsyncEnumerable<TSource>, Func<TSource, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource>?)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static void WrapAndPublishBatch<TSource, TMessage>(this IPublisher publisher, IAsyncEnumerable<TSource> sources, Func<TSource, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource>? envelopeConfigurationAction = null) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIAsyncEnumerable<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TMessage>The function used to map the source objects to messages.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TSource>An optional action that can be used to configure the envelopes.
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
WrapAndPublishBatch<TMessage, TArgument>(IPublisher, IEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static void WrapAndPublishBatch<TMessage, TArgument>(this IPublisher publisher, IEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIEnumerable<TMessage>The messages to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
envelopeConfigurationAction.
Type Parameters
TMessageThe type of the messages to be published.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.
WrapAndPublishBatch<TSource, TMessage>(IPublisher, IEnumerable<TSource>, Func<TSource, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource>?)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static void WrapAndPublishBatch<TSource, TMessage>(this IPublisher publisher, IEnumerable<TSource> sources, Func<TSource, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource>? envelopeConfigurationAction = null) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIEnumerable<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TMessage>The function used to map the source objects to messages.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TSource>An optional action that can be used to configure the envelopes.
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
WrapAndPublishBatch<TMessage, TArgument>(IPublisher, IReadOnlyCollection<TMessage?>, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument)
Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.
public static void WrapAndPublishBatch<TMessage, TArgument>(this IPublisher publisher, IReadOnlyCollection<TMessage?> messages, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messagesIReadOnlyCollection<TMessage>The messages to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
envelopeConfigurationAction.
Type Parameters
TMessageThe type of the messages to be published.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.
WrapAndPublishBatch<TSource, TMessage>(IPublisher, IReadOnlyCollection<TSource>, Func<TSource, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource>?)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static void WrapAndPublishBatch<TSource, TMessage>(this IPublisher publisher, IReadOnlyCollection<TSource> sources, Func<TSource, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource>? envelopeConfigurationAction = null) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIReadOnlyCollection<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TMessage>The function used to map the source objects to messages.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TSource>An optional action that can be used to configure the envelopes.
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
WrapAndPublishBatch<TSource, TMessage, TArgument>(IPublisher, IAsyncEnumerable<TSource>, Func<TSource, TArgument, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource, TArgument>, TArgument)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static void WrapAndPublishBatch<TSource, TMessage, TArgument>(this IPublisher publisher, IAsyncEnumerable<TSource> sources, Func<TSource, TArgument, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIAsyncEnumerable<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TArgument, TMessage>The function used to map the source objects to messages.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TSource, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
mapperFunctionand theenvelopeConfigurationAction.
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.
WrapAndPublishBatch<TSource, TMessage, TArgument>(IPublisher, IEnumerable<TSource>, Func<TSource, TArgument, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource, TArgument>, TArgument)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static void WrapAndPublishBatch<TSource, TMessage, TArgument>(this IPublisher publisher, IEnumerable<TSource> sources, Func<TSource, TArgument, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIEnumerable<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TArgument, TMessage>The function used to map the source objects to messages.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TSource, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
mapperFunctionand theenvelopeConfigurationAction.
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.
WrapAndPublishBatch<TSource, TMessage, TArgument>(IPublisher, IReadOnlyCollection<TSource>, Func<TSource, TArgument, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource, TArgument>, TArgument)
Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.
public static void WrapAndPublishBatch<TSource, TMessage, TArgument>(this IPublisher publisher, IReadOnlyCollection<TSource> sources, Func<TSource, TArgument, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
sourcesIReadOnlyCollection<TSource>The source objects to be mapped.
mapperFunctionFunc<TSource, TArgument, TMessage>The function used to map the source objects to messages.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TSource, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
mapperFunctionand theenvelopeConfigurationAction.
Type Parameters
TSourceThe type of the source objects.
TMessageThe type of the messages to be produced.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.
WrapAndPublish<TMessage>(IPublisher, TMessage?, Action<IOutboundEnvelope<TMessage>>?)
Wraps the message in an IOutboundEnvelope<TMessage> and publishes it.
public static void WrapAndPublish<TMessage>(this IPublisher publisher, TMessage? message, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction = null) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messageTMessageThe message to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>>An optional action that can be used to configure the envelope.
Type Parameters
TMessageThe type of the message to be published.
WrapAndPublish<TMessage, TArgument>(IPublisher, TMessage?, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument)
Wraps the message in an IOutboundEnvelope<TMessage> and publishes it.
public static void WrapAndPublish<TMessage, TArgument>(this IPublisher publisher, TMessage? message, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class
Parameters
publisherIPublisherThe IPublisher.
messageTMessageThe message to be published.
envelopeConfigurationActionAction<IOutboundEnvelope<TMessage>, TArgument>The action used to configure the envelopes.
argumentTArgumentThe argument to be passed to the
envelopeConfigurationAction.
Type Parameters
TMessageThe type of the message to be published.
TArgumentThe type of the argument passed to the
envelopeConfigurationAction.