DevChatterBot
DevChatterBot copied to clipboard
Clean Up Dependency Injection
Our current "poor man's dependency injection" approach isn't going to cut it much longer, we should rework it to better manage resources.
I'd like to take a stab at this. Does Autofac work for you?
Yes, Autofac is good, and let me know if it gets tricky.
We've added autofac, but we still need to clean up here.
@benrick Next steps I'm going to start on tonight are primarily two things,
- Inspect all the interfaces #107 created, find our common functionality, and pair it down if possible, then
- Break down modules (games, non "core" commands, twitch, etc). I'd very much like to have the only type references in the DevChatter.Bot project to be from DevChatter.Bot.Core, while everything else must implement through a single entry point per type of module (one for commands, one for chat clients). Maybe we can get a basic plugin architecture, but the worst case scenario is a single call per module in the comp root like
container.RegisterModule<TwitchModule>();
// etc.