the Injected instance not get resolve when we put "this.Injectable()" in the first place when constructing the ServiceRegistry, and work as expected if we put at last:
class RunTimeInjectServiceReg : ServiceRegistry
{
public RunTimeInjectServiceReg()
{
this.Injectable<IMyTest>(); //wrong! not resolve
For<IMyTest>().Use<MyTest>()
.Ctor<string>("name").Is("alpha").Named("A");
For<IMyTest>().Use<MyTest>()
.Ctor<string>("name").Is("beta").Named("B");
For<IMyTest>().Use<MyTest>()
.Ctor<string>("name").Is("gamma").Named("G");
//this.Injectable<IMyTest>(); // correct, work as expected
}
}
Could you please help to take a look? and appreciate if you could help pointing out the line of code causing this behavior.
Program.txt
In the Attach Program,
the Injected instance not get resolve when we put "this.Injectable()" in the first place when constructing the ServiceRegistry, and work as expected if we put at last:
Could you please help to take a look? and appreciate if you could help pointing out the line of code causing this behavior.
Thanks a lot.