tags:

views:

54

answers:

1

All examples of StructureMap that I've seen use the static ObjectFactory class to initialize and resolve objects. I however would like to pass around a reference to my container. I assume that ObjectFactory is just a singleton wrapper for a non-static object. But where is it?

+2  A: 

Short answer: new Container()

Long answer: http://structuremap.sourceforge.net/UsingTheContainerOutsideOfObjectFactory.htm

Matt Hinze
Thanks Matt, I was having problems finding that for some reason
George Mauer