I’m used to work with StructureMap with Web Apps… but now, I’m working on a Windows Forms project and I’d like to use it, but I don’t how to configure it.
In web, I’d have a bootstrapper class that is invoked on Application_Start on Global.asax, but I don’t know how to do the same on WinForms.
Thanks!
You can initialize the container in the static main method that starts your application. Then retrieve your form instances from the container, so that any necessary dependencies can be injected. You could still put the initialization code in a Bootstrapper.