How can I inject the plugin dependencies from my API project ?
kuldeepGDI opened this issue · comments
Kuldeep Adhikari commented
I am trying to use a library that is installed in my plugin as nuget. Now i would like to use the methods provided by this library via initializing its object in plugin, however I do not want to new up the LibraryObject. How can I use DI in my plugin so that I get an instantiated LibraryObject if I have it injected in my PluginConstructor
THanks
Nate McMaster commented
Here is a sample demonstrating dependency injection. https://github.com/natemcmaster/DotNetCorePlugins/tree/main/samples/dynamic-implementation
Closing as I believe this answers the question.