natemcmaster / DotNetCorePlugins

.NET Core library for dynamically loading code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I inject the plugin dependencies from my API project ?

kuldeepGDI opened this issue · comments

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

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.