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

Ensure all the dependency injection methods are accurately represented #26

Open
philpax opened this issue Apr 16, 2022 · 1 comment
Open

Comments

@philpax
Copy link
Contributor

philpax commented Apr 16, 2022

There are now three, if my understanding serves me correctly:

  1. accepting the services as parameters in your constructor
  2. accepting the services as fields of your primary Plugin class (it is automatically initialised)
  3. initialising another class with pluginInterface.Create to populate its static fields
@philpax
Copy link
Contributor Author

philpax commented Apr 16, 2022

Creation and injection of your own services and classes:

var poop1 = di.Create<PoopyClass>(myServiceA, myServiceB);
var poop2 = di.Inject(poopInstance, myServiceA, myServiceB);

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