Class AsyncEvent
A container for event listeners, fired asynchronously.
Inherited Members
Namespace: LemonEdge.Utils
Assembly: LemonEdge.Utils.dll
Syntax
public class AsyncEvent : EventBase<Func<Task>>
Constructors
AsyncEvent()
Declaration
public AsyncEvent()
Methods
AddListener(Action)
Adds a listener to the given event.
Declaration
public bool AddListener(Action action)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | action | The task to execute when the event occurs. |
Returns
| Type | Description |
|---|---|
| bool |
OnChanged()
Notifies all the listeners that the event has occurred.
Declaration
public Task OnChanged()
Returns
| Type | Description |
|---|---|
| Task | A task indicating when all listeners have finished processing the notification |