DevChatter / ChatterBot

Highly modular Twitch chat bot.
MIT License
10 stars 5 forks source link

Dynamically Load and Run Chatter Modules #19

Open benrick opened 4 years ago

benrick commented 4 years ago

For our custom C# modules, we'll need a way for them to be dynamically loaded at runtime when the user activates the module while the bot is running.

We could possibly use AssemblyLoadContext.Default.LoadFromAssemblyPath(path) from the System.Runtime.Loader package in order to get the assembly loaded and then we'll use some kind of reflection to find the interfaces we're looking for.

We might be using a custom interface, or it could be something loaded into mediatr, but should discuss before implementing something for this.

This depends on #13 existing, since that's how we'll find the interface we're calling in their code.