Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify plugins to use [Import] to replace singletons #1670

Open
vchelaru opened this issue Jan 2, 2025 · 1 comment
Open

Modify plugins to use [Import] to replace singletons #1670

vchelaru opened this issue Jan 2, 2025 · 1 comment

Comments

@vchelaru
Copy link
Owner

vchelaru commented Jan 2, 2025

@zdman2022 had originally set up the plugins to import their dependencies like this:

[Import("GlueCommands")]
public IGlueCommands GlueCommands
{
    get;
    set;
}

We are moving away from singletons and instead moving to this. Need to start moving some of the main plugins over as examples, and see if there's any work that has to be done to support imports...

Example:

Update 1

It seems like these get imported so long as the PluginManager exports them:

[Export("GlueCommands")]

@vchelaru
Copy link
Owner Author

vchelaru commented Jan 2, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant