MessageBusBaseRegisterSubscriberTParameter, TReturn(MessageNameMatcherBase, SubscriberAsyncTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Method

Register a subscriber with parameter and return value using the message name matcher specified.


Namespace: SecretNest.MessageBus
Assembly: SecretNest.MessageBus.DirectRelease (in SecretNest.MessageBus.DirectRelease.dll) Version: 1.0.0
public abstract SubscriberTicket<TParameter, TReturn, SubscriberAsync<TParameter, TReturn>> RegisterSubscriber<TParameter, TReturn>(
	MessageNameMatcherBase messageNameMatcher,
	SubscriberAsync<TParameter, TReturn> handler,
	MessageBusSubscriberOptions<TParameter, TReturn>? options = null


messageNameMatcher  MessageNameMatcherBase
Use the matcher to traverse all message names to determine messages those need to be subscribed.
handler  SubscriberAsyncTParameter, TReturn
The handler of the async delegate with a parameter, a parameter of CancellationToken and return.
options  MessageBusSubscriberOptionsTParameter, TReturn  (Optional)
The instance of subscriber options. Default is .

Type Parameters

The type of the parameter.
The type of the return value.

Return Value

SubscriberTicketTParameter, TReturn, SubscriberAsyncTParameter, TReturn
Subscriber ticket.

See Also