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
TThe 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
valueTThe value to be passed to the callback methods.
Subscribe(Action<T>)
Subscribes to the event.
public void Subscribe(Action<T> callback)
Parameters
callbackAction<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
callbackAction<T>The callback method to be removed from the subscribers list.