Table of Contents

Class AsyncEvent<TSender, TArgs>

Namespace
DSharpPlus.AsyncEvents
Assembly
DSharpPlus.dll

Provides an implementation of an asynchronous event. Registered handlers are executed asynchronously, in parallel, and potential exceptions are caught and sent to the specified exception handler.

public sealed class AsyncEvent<TSender, TArgs> : AsyncEvent where TArgs : AsyncEventArgs

Type Parameters

TSender

The type of the object to dispatch this event.

TArgs

The type of the argument object for this event.

Inheritance
object
AsyncEvent<TSender, TArgs>
Inherited Members

Constructors

AsyncEvent(IClientErrorHandler)

Methods

InvokeAsync(TSender, TArgs)

Raises this event, invoking all registered handlers in parallel.

Register(AsyncEventHandler<TSender, TArgs>)

Registers a new handler for this event.

Unregister(AsyncEventHandler<TSender, TArgs>)

Unregisters a specific handler from this event.

UnregisterAll()

Unregisters all handlers from this event.