Class EventBus
Inheritance
System.Object
EventBus
Implements
IAsyncDisposable
Assembly: OpenMod.Core.dll
Syntax
public class EventBus : object, IEventBus, IAsyncDisposable
Constructors
|
Improve this Doc
View Source
EventBus(ILogger<EventBus>)
Declaration
public EventBus(ILogger<EventBus> logger)
Parameters
Type |
Name |
Description |
ILogger<EventBus> |
logger |
|
Methods
|
Improve this Doc
View Source
DisposeAsync()
Declaration
public virtual ValueTask DisposeAsync()
Returns
Type |
Description |
ValueTask |
|
|
Improve this Doc
View Source
EmitAsync(IOpenModComponent, Nullable<Object>, IEvent, EventExecutedCallback)
Declaration
public virtual Task EmitAsync(IOpenModComponent component, object? sender, IEvent event, EventExecutedCallback callback = null)
Parameters
Returns
|
Improve this Doc
View Source
GetEventListenerAttribute(MethodInfo)
Declaration
protected virtual EventListenerAttribute GetEventListenerAttribute(MethodInfo method)
Parameters
Type |
Name |
Description |
MethodInfo |
method |
|
Returns
|
Improve this Doc
View Source
Subscribe(IOpenModComponent, Assembly)
Declaration
public virtual IDisposable Subscribe(IOpenModComponent component, Assembly assembly)
Parameters
Returns
Type |
Description |
IDisposable |
|
|
Improve this Doc
View Source
Subscribe(IOpenModComponent, String, EventCallback)
Declaration
public virtual IDisposable Subscribe(IOpenModComponent component, string eventName, EventCallback callback)
Parameters
Returns
Type |
Description |
IDisposable |
|
|
Improve this Doc
View Source
Subscribe(IOpenModComponent, String, EventCallback, IEventListenerOptions)
Declaration
public virtual IDisposable Subscribe(IOpenModComponent component, string eventName, EventCallback callback, IEventListenerOptions options)
Parameters
Returns
Type |
Description |
IDisposable |
|
|
Improve this Doc
View Source
Subscribe(IOpenModComponent, Type, EventCallback)
Declaration
public virtual IDisposable Subscribe(IOpenModComponent component, Type eventType, EventCallback callback)
Parameters
Returns
Type |
Description |
IDisposable |
|
|
Improve this Doc
View Source
Subscribe(IOpenModComponent, Type, EventCallback, IEventListenerOptions)
Declaration
public virtual IDisposable Subscribe(IOpenModComponent component, Type eventType, EventCallback callback, IEventListenerOptions options)
Parameters
Returns
Type |
Description |
IDisposable |
|
|
Improve this Doc
View Source
Subscribe<TEvent>(IOpenModComponent, EventCallback<TEvent>)
Declaration
public virtual IDisposable Subscribe<TEvent>(IOpenModComponent component, EventCallback<TEvent> callback)
where TEvent : IEvent
Parameters
Returns
Type |
Description |
IDisposable |
|
Type Parameters
|
Improve this Doc
View Source
Subscribe<TEvent>(IOpenModComponent, EventCallback<TEvent>, IEventListenerOptions)
Declaration
public virtual IDisposable Subscribe<TEvent>(IOpenModComponent component, EventCallback<TEvent> callback, IEventListenerOptions options)
where TEvent : IEvent
Parameters
Returns
Type |
Description |
IDisposable |
|
Type Parameters
|
Improve this Doc
View Source
Unsubscribe(IOpenModComponent)
Declaration
public virtual void Unsubscribe(IOpenModComponent component)
Parameters
|
Improve this Doc
View Source
Unsubscribe(IOpenModComponent, String)
Declaration
public virtual void Unsubscribe(IOpenModComponent component, string eventName)
Parameters
|
Improve this Doc
View Source
Unsubscribe(IOpenModComponent, Type)
Declaration
public virtual void Unsubscribe(IOpenModComponent component, Type eventType)
Parameters
|
Improve this Doc
View Source
Unsubscribe<TEvent>(IOpenModComponent)
Declaration
public virtual void Unsubscribe<TEvent>(IOpenModComponent component)
where TEvent : IEvent
Parameters
Type Parameters
Implements
IAsyncDisposable
Extension Methods