StructureMap ObjectFactory initialization

Mar 13, 2013 at 2:03 PM
Edited Mar 13, 2013 at 2:04 PM
Hello,

I consider using Bootstrapper as a convenient way to initialize my application.

I've got a couple custom Registries for StructureMap and my startup code is:

Bootstrapper.With.AutoMapper().And.StructureMap().Start();

After that I see that Bootstrapper has it's own Container properly initialized but ObjectFactory's container is not initialized at all.

I revised Bootstrapper source code and found out that Bootstrapper does not care about StructureMap's ObjectFactory at all.

It looks like I missed a bit of ideology behind of such behavior.

Could you explain whether it's possible to use Bootstrapper to initialize ObjectFactory, please?
Coordinator
Mar 22, 2013 at 2:04 AM
Hi palazkov,

I see your problem and I think I saw this happening before when trying to use Bootstrapper with NService Bus.
Let me do some digging to see if I can somehow pass the initialized container to the ObjectFactory or something like that.
Thanks for the feedback.

Luis
Coordinator
Apr 12, 2013 at 3:57 PM
Hello again,

Check the latest version. Now you can say Boostrapper.With.StructureMap().UsingObjectFactory().Start();

Thanks

Luis
Apr 13, 2013 at 11:04 AM
Hello,

Now it works like a charm! :)

Thank you!