Table of Contents

Class Event

Namespace
Exiled.Events.Features
Assembly
Exiled.Events.dll

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

IReadOnlyList<Event>

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 CustomAsyncEventHandler

The 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 CustomEventHandler

The 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 CustomAsyncEventHandler

The 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 CustomEventHandler

The 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 Event

The Event to subscribe the CustomAsyncEventHandler to.

asyncEventHandler CustomAsyncEventHandler

The CustomAsyncEventHandler to subscribe to the Event.

Returns

Event

The Event with the handler added to it.

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 Event

The Event to subscribe the CustomEventHandler to.

handler CustomEventHandler

The CustomEventHandler to subscribe to the Event.

Returns

Event

The Event with the handler added to it.

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 Event

The Event the CustomAsyncEventHandler will be unsubscribed from.

asyncEventHandler CustomAsyncEventHandler

The CustomAsyncEventHandler that will be unsubscribed from the Event.

Returns

Event

The Event with the handler unsubscribed from it.

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 Event

The Event the CustomEventHandler will be unsubscribed from.

handler CustomEventHandler

The CustomEventHandler that will be unsubscribed from the Event.

Returns

Event

The Event with the handler unsubscribed from it.