Class EventPublisher<T>
- Namespace
- QuickLink
- Assembly
- QuickLink.dll
Represents an event publisher that allows subscribing to and publishing events with a specified argument type.
public class EventPublisher<T>
Type Parameters
T
The type of the argument for the event.
- Inheritance
-
EventPublisher<T>
- Inherited Members
Methods
Publish(T)
Publishes the event with the specified message, invoking all the subscribed callback methods.
public void Publish(T value)
Parameters
value
TThe value to be passed to the callback methods.
Subscribe(Action<T>)
Subscribes to the event.
public void Subscribe(Action<T> callback)
Parameters
callback
Action<T>The callback method to be invoked when the event is published.
Unsubscribe(Action<T>)
Unsubscribes from the event.
public void Unsubscribe(Action<T> callback)
Parameters
callback
Action<T>The callback method to be removed from the subscribers list.