Table of Contents

Method RegisterEventHandler

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

RegisterEventHandler(object, bool)

Registers all methods annotated with EventAttribute from the given object.

public void RegisterEventHandler(object handler, bool registerStatic = false)

Parameters

handler object

The event handler object.

registerStatic bool

Whether to consider static methods.

RegisterEventHandler(Type)

If abstract, registers all static methods of the type.

If non-abstract, tries to instantiate it, optionally using the provided ServiceProvider and registers all instance and static methods.

public void RegisterEventHandler(Type type)

Parameters

type Type

Type to register.

RegisterEventHandler<T>()

public void RegisterEventHandler<T>()

Type Parameters

T

Type to register.