views:

196

answers:

2

Lately I've been using a larger number of smaller objects, because they are simpler and easier to reuse. Most of the time there isn't any problem injecting these objects into one another using StructureMap (great tool, btw). But occasionally, I f*** up, and I get myself a nice circular reference in the guise of a stack overflow exception(tm).

So other 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 out there that could be useful in this situation?

Thanks everyone!

+2  A: 

ObjectFactory.AssertConfigurationIsValid(); will check your graph and attempt to instantiate all plugged types.

Matt Hinze
+1  A: 

Check this out: "Advanced StructureMap: Diagnosing problems"

cottsak