Is there a way to detect and debug circular references when using StructureMap?

Recently, I have been using more smaller objects because they are simpler and easier to reuse. In most cases, there is no problem injecting these objects into each other using StructureMap (a great tool, by the way). But sometimes, I f *** up, and I get myself a good circular link as an exception (tm).

Otherwise, than going through all my recent changes since the last test run, does StructureMap provide any mechanism for debugging circular references, or is there a simple tool that can be useful in this situation?

Thanks everyone!

+3
source share
1 answer

ObjectFactory.AssertConfigurationIsValid(); will check your graph and try to create an instance of all connected types.

+2
source

Source: https://habr.com/ru/post/1712109/


All Articles