我有這個主窗體的WinForms應用程序:如何在Windows窗體應用程序中使用Ninject?
ICountRepository countRepository;
public MainForm(ICountRepository countRepository)
{
this.countRepository = countRepository;
}
public void IncrementCount()
{
countRepository.IncrementCount();
}
,但我在努力注入ICountRepository
到MainForm的。我怎麼做 ?
相關:http://stackoverflow.com/questions/19937187/does-di-make-sense-in-a-desktop-app – 2013-11-14 15:38:43