MessageBusBaseRegisterSubscriberTParameter, TReturn(String, SubscriberTParameter, TReturn, MessageBusSubscriberOptionsTParameter, TReturn) Method

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

Definition

Namespace: SecretNest.MessageBus
Assembly: SecretNest.MessageBus.DirectRelease (in SecretNest.MessageBus.DirectRelease.dll) Version: 1.0.0
C#
public abstract SubscriberTicket<TParameter, TReturn, Subscriber<TParameter, TReturn>> RegisterSubscriber<TParameter, TReturn>(
	string messageName,
	Subscriber<TParameter, TReturn> handler,
	MessageBusSubscriberOptions<TParameter, TReturn>? options = null
)

Parameters

messageName  String
The message name to be subscribed.
handler  SubscriberTParameter, TReturn
The handler of the delegate with a parameter and return.
options  MessageBusSubscriberOptionsTParameter, TReturn  (Optional)
The instance of subscriber options. Default is .

Type Parameters

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

Return Value

SubscriberTicketTParameter, TReturn, SubscriberTParameter, TReturn
Subscriber ticket.

See Also