Skip to content

IEventSource<out T>

Interface · Namespace OMX.ModAPI · Assembly OMX.ModAPI.Shared.dll

public interface IEventSource<out T>

Something a resource can subscribe to. The handler always runs on the subscribing resource’s own thread, one call at a time and in order, never on the engine thread; an exception it throws is logged against the resource and does not affect other subscribers. Dispose the returned object to stop. All subscriptions end when the resource is unloaded.

IDisposable Subscribe(Action<T> handler);

Parameters

Returns IDisposable