I am trying to use an IOC container to create the initial object graph in my app.
I have a main form. This form depends on the menu strip, which depends on multiple menu striipimes. Some menu stripes depend on the main farm.
Currently, I set up all the dependencies for manufacturer injection. Clearly, the mainform solution is now in the stack overflow, as the mainstream dependent dependency on the mainframe attempts to solve the problem, etc ...
The most important of this circular dependency is to solve What's the best way? Circular dependency is a sign of poor design, whether you are using IoC or not. I recommend that you do a new design to avoid it. Adding a helper object can be a solution. For example, the Main Strip only relies on a part of the mainframe which is necessary for them and not the whole.
Comments
Post a Comment