Hi, I'm new to structuremap. :))
I have a class which implements IPresenter :
public class SoldierPresenter : IPresenter
{
...
public SolierPresenter(ISoldierView soldierView)
{
}
...
}
When I call :
var presenters = ObjectFactory.GetAllInstances<IPresenter>();
I get zero instances... what am i missing?!
Here is the configuration code for the container:
Scan(
scanner =>
{
scanner.AssemblyContainingType(typeof(IShell));
scanner.WithDefaultConventions();
scanner.TheCallingAssembly();
scanner.AddAllTypesOf<IPresenter>();
scanner.WithDefaultConventions();
});
Thanks in advance, Erik.
Container.WhatDoIHave(); Shows the following:
IPresenter (DutyManager.Presentation.Framework.IPresenter) DutyManager.Presentation.SoldiersPresenter, DutyManager.Presentation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Configured DutyManager.Presentation.SoldiersPresenter, DutyManager.Presentation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Scoped as: PerRequest
ISoldiersView (DutyManager.Presentation.ISoldiersView) DutyManager.Presentation.SoldiersView, DutyManager.Presentation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DutyManager.Presentation.SoldiersView, DutyManager.Presentation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Scoped as: PerRequest