I'm using MVVM light and have set up the binding as following:
class TestModule:NinjectModule
{
public override void Load()
{
Bind<ICollection<Element>>().To<Collection<Element>>();
Bind<Element>().ToSelf();
}
}
When I try to get a ICollection I get a collection with ONE element. I expect an exmpty collection.
var _kernel = new StandardKernel(new TestModule());
var col = _kernel.Get<ICollection<Element>>();
Console.WriteLine("Count={0}", col.Count); //Write "Count=1", Expect "Count=0"