Circular Dependency
Heyo :D,
So I have started getting into somewhat bigger projects again and needed to use Dependency Injections to loose coupling and overall tightness between classes. Since 2 of my classes (and likely in the future, more class depend on each other), it's a good approach to create abstractions to expose only a fraction of the class that other classes need to access. This way, I am not exposing it concretely. However, for some reason, I am running into a circular dependency exception which I don't seem to... really understand? I get where the issue is but I can't figure out a more plausible approach. I would appreciate some feedback on what potentially can be done.
To give the issue.. ILoggingManager depends on IYukkaifyEnvironment, which in turn depends on ILoggingManager..
So I have started getting into somewhat bigger projects again and needed to use Dependency Injections to loose coupling and overall tightness between classes. Since 2 of my classes (and likely in the future, more class depend on each other), it's a good approach to create abstractions to expose only a fraction of the class that other classes need to access. This way, I am not exposing it concretely. However, for some reason, I am running into a circular dependency exception which I don't seem to... really understand? I get where the issue is but I can't figure out a more plausible approach. I would appreciate some feedback on what potentially can be done.
To give the issue.. ILoggingManager depends on IYukkaifyEnvironment, which in turn depends on ILoggingManager..