I m using StructureMap 2.6.1
This is the code from Bootstrapper.cs:
ObjectFactory.Initialize(x => x.For<IFoo>().Use<Foo>());
在我提出申请时,我有以下例外:
No Default Instance defined for PluginFamily IFoo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
在我使用这一过时的法典时,我没有例外:
ForRequestedType<IFoo>()
.TheDefault.Is.OfConcreteType<Foo>();
Can anyone tell me the latest syntax for ObjectFactory s initializer?
Thank you.