❔ OOP Event Handler implementation
Hi,
I am using D#+ (DiscordSharpPlus) and I am trying to figure out a class based implementation for handling events, instead of doing something like
client.Ready += OnReady
where I subscribe to the event in a functional programming way, I would like to have a class like this
I preferably want to use something like assembly scanning to automatically get these Handlers but I am not familiar enough wit Reflection to get the parameter passed to base
and then also somehow connecting this to the event (I guess I need to use addEventListener())
2 Replies
I'm using the EventType enum because I would like to avoid typos
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.