Skip to content

EventBus

Namespace NetWiv · Assembly NetWiv.Core

public sealed class EventBus : IDisposable
public EventBus();
public void Dispose();
public IDisposable Listen(string eventName, Action<AppEvent> handler);
public IDisposable Listen(string eventName, RuntimeEventTarget target, Action<AppEvent> handler);
public IDisposable Once(string eventName, Action<AppEvent> handler);
public IDisposable Once(string eventName, RuntimeEventTarget target, Action<AppEvent> handler);
public void Unlisten(long id);

Removes the backend listener identified by AppEvent.Id; unknown IDs are ignored.