You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have an option to run custom code, e.g. have a library implementing the IWork interface which is then linked by the WebWorker service. This way we can run code without dynamically loading it.
The text was updated successfully, but these errors were encountered:
hirre
changed the title
Ability to run custom code
Ability to run custom (IWork) code without dynamic loading
Jul 19, 2024
This one can be done by referencing a custom lib from webworker. Then add your custom classes that implement the IWork interface to the workPluginRepo. Class name --> object instance.
Example based on Program.cs:
var repo = app.Services.GetService<WorkPluginRepo>();
LoadWorkPlugins(repo);
Loads all dynamic plugins.
And then you can e.g. after that method call do:
var myCustomWorkClassInstance = app.Services.GetService<MyCustomWorkClass>(); // Singleton
repo.AddWorkPlugin("MyCustomWorkClass", myCustomWorkClassInstance);
Have an option to run custom code, e.g. have a library implementing the IWork interface which is then linked by the WebWorker service. This way we can run code without dynamically loading it.
The text was updated successfully, but these errors were encountered: