Why is it not possible for me to do the following in Ninect?
Kernel.Bind<IPresenter>.To<DefaultPresenter>();
Kernel.Bind<IPresenter>.To<DashboardPresenter>();
Kernel.Bind<IPresenter>.To<HeartRatePresenter>();
Kernel.Bind<IPresenter>.To<GPSPresenter>();
Each of the 4 implementations have a different constructor that expect a different type. When i attempt this, Ninject throws an exception telling me that i cannot bind to the same interface more than once.
In a class called Presentable
which all presenter classes inherit from, I am attempting to do Kernel.Get<IPresenter>(new ConstructorArgument("view", this))
so assign IPresentable Presenter
within the page/view where the page/view implements an interface that the presenter expects as a parameter.
What is a way around this so that ninject recognises different constructor parameter types?