Table of Contents

Method AddEventHandlers

Namespace
DSharpPlus
Assembly
DSharpPlus.dll

AddEventHandlers<T>(ServiceLifetime)

Registers all event handlers implemented on the provided type.

public EventHandlingBuilder AddEventHandlers<T>(ServiceLifetime lifetime = ServiceLifetime.Transient) where T : IEventHandler

Parameters

lifetime ServiceLifetime

Returns

EventHandlingBuilder

Type Parameters

T

AddEventHandlers(IReadOnlyList<Type>, ServiceLifetime)

Registers all event handlers implemented on the provided types.

public EventHandlingBuilder AddEventHandlers(IReadOnlyList<Type> types, ServiceLifetime lifetime = ServiceLifetime.Transient)

Parameters

types IReadOnlyList<Type>
lifetime ServiceLifetime

Returns

EventHandlingBuilder