Class Event
An implementation of IExiledEvent that encapsulates a no-argument event.
public class Event : IExiledEvent
- Inheritance
-
Event
- Implements
- Inherited Members
- Extension Methods
Constructors
Event()
Initializes a new instance of the Event class.
public Event()
Properties
List
Gets a IReadOnlyList<T> of Event<T> which contains all the Event<T> instances.
public static IReadOnlyList<Event> List { get; }
Property Value
Methods
InvokeSafely()
Executes all CustomEventHandler listeners safely.
public void InvokeSafely()
Subscribe(CustomAsyncEventHandler)
Subscribes a target CustomAsyncEventHandler to the inner event if the conditional is true.
public void Subscribe(CustomAsyncEventHandler handler)
Parameters
handler
CustomAsyncEventHandlerThe handler to add.
Subscribe(CustomEventHandler)
Subscribes a target CustomEventHandler to the inner event if the conditional is true.
public void Subscribe(CustomEventHandler handler)
Parameters
handler
CustomEventHandlerThe handler to add.
Unsubscribe(CustomAsyncEventHandler)
Unsubscribes a target CustomAsyncEventHandler from the inner event if the conditional is true.
public void Unsubscribe(CustomAsyncEventHandler handler)
Parameters
handler
CustomAsyncEventHandlerThe handler to add.
Unsubscribe(CustomEventHandler)
Unsubscribes a target CustomEventHandler from the inner event if the conditional is true.
public void Unsubscribe(CustomEventHandler handler)
Parameters
handler
CustomEventHandlerThe handler to add.
Operators
operator +(Event, CustomAsyncEventHandler)
Subscribes a CustomAsyncEventHandler to the inner event, and checks patches if dynamic patching is enabled.
public static Event operator +(Event @event, CustomAsyncEventHandler asyncEventHandler)
Parameters
event
EventThe Event to subscribe the CustomAsyncEventHandler to.
asyncEventHandler
CustomAsyncEventHandlerThe CustomAsyncEventHandler to subscribe to the Event.
Returns
operator +(Event, CustomEventHandler)
Subscribes a CustomEventHandler to the inner event, and checks patches if dynamic patching is enabled.
public static Event operator +(Event @event, CustomEventHandler handler)
Parameters
event
EventThe Event to subscribe the CustomEventHandler to.
handler
CustomEventHandlerThe CustomEventHandler to subscribe to the Event.
Returns
operator -(Event, CustomAsyncEventHandler)
Unsubscribes a target CustomAsyncEventHandler from the inner event, and checks if unpatching is possible, if dynamic patching is enabled.
public static Event operator -(Event @event, CustomAsyncEventHandler asyncEventHandler)
Parameters
event
EventThe Event the CustomAsyncEventHandler will be unsubscribed from.
asyncEventHandler
CustomAsyncEventHandlerThe CustomAsyncEventHandler that will be unsubscribed from the Event.
Returns
operator -(Event, CustomEventHandler)
Unsubscribes a target CustomEventHandler from the inner event, and checks if unpatching is possible, if dynamic patching is enabled.
public static Event operator -(Event @event, CustomEventHandler handler)
Parameters
event
EventThe Event the CustomEventHandler will be unsubscribed from.
handler
CustomEventHandlerThe CustomEventHandler that will be unsubscribed from the Event.