in asp.net-mvc I have the Windsor Controller Factory that injects all the dependencies into the controllers, but how do you get this in Windows Forms ?
for example if have this Form1, how am I going to get an instance of Form1, should I use resolve (which is called ServiceLocator and anti-pattern by some ppl)?
public class Form1
{
private IBarService _barService;
public Form1(IBarService barService)
{
_barService = barService;
}
}
Obsolete
approach is not working, designer still shows broken – Yearbook