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

feat: remove circular reference/dependency #53

Open
NedcloarBR opened this issue Sep 18, 2024 · 2 comments
Open

feat: remove circular reference/dependency #53

NedcloarBR opened this issue Sep 18, 2024 · 2 comments

Comments

@NedcloarBR
Copy link

LavalinkManager has NodeManager and ManagerUtils that need LavalinkManager to be instantiated but the LavalinkManager property is public so we have the circular reference/dependency problem.

LavalinkManager.NodeManager.LavalinkManager.ManagerUtils.LavalinkManager

And it goes on endlessly.
In this Issue I suggest that the LavalinkManager be private within classes that are its properties

@Tomato6966
Copy link
Owner

making something private doesn'T solve circular references

I will think of how to reduce the circular references

@appujet
Copy link
Contributor

appujet commented Sep 21, 2024

You can do

Dependency Injection After Instantiation

Or
Lazy Initialization

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

3 participants