Skip to main content

TavernEvents.TavernEvent<T>

A class in TavernLib, TavernLib.Utils.

An event mods can subscribe to but only TavernLib can raise. Used for TavernEvents.SocketCreated and Roles.RolesChanged.

Constructors​

MemberWhat it is
TavernEvent()Created by TavernLib; mods don't make one.

Events​

1 private and internal event
MemberWhat it is
private event Action<T> HandlersThe subscribed handlers, called by Invoke.

Methods​

MemberWhat it is
void Subscribe(Action<T> handler)Adds a handler.
void Unsubscribe(Action<T> handler)Removes a handler. Pass the same delegate you subscribed, not a new lambda.
1 private and internal method
MemberWhat it is
internal void Invoke(T arg)Internal: raises the event, calling every handler with arg. Nothing catches a handler's exception.

Used in​

Members of other types that take, return or hold a TavernEvent&lt;T>: