Message Method
Message(Action<IHTopic<T>, TopicMessageEventArgs<T>>)
Adds an handler which runs when a message is submitted.
Declaration
public TopicEventHandlers<T> Message(Action<IHTopic<T>, TopicMessageEventArgs<T>> handler)
Parameters
Action<IHTopic<T>, TopicMessageEventArgs<T>> | handler | The handler. |
Returns
TopicEventHandlers<T> | The handlers. |
Message(Func<IHTopic<T>, TopicMessageEventArgs<T>, ValueTask>)
Adds an handler which runs when a message is submitted.
Declaration
public TopicEventHandlers<T> Message(Func<IHTopic<T>, TopicMessageEventArgs<T>, ValueTask> handler)
Parameters
Func<IHTopic<T>, TopicMessageEventArgs<T>, ValueTask> | handler | The handler. |
Returns
TopicEventHandlers<T> | The handlers. |