Hi,
Here is the c# code:
var server = ******* some internal logic to determine server name ****
var username = ******* some internal logic to determine user name ****
var password = ******* some internal logic to determine password ****
ObjectFactory.Initialize(x =>
{
x.For<IService<bool>>().Add<Service>()
.Ctor<string>("server").Is(server)
.Ctor<string>("username").Is(username)
.Ctor<string>("password").Is(password)
}
This works great but I would like to move this to configuration file as I don't want to reference to concerete type directly in my code.
There isn't much documentation about 2.6. I couldn't find how to handle this in configuration.
Ideally I would like to inject the server, username, and password paramenters in to ObjectFactory and some how use these parameters in the configuration.
(PS: It doesn't necessary need to be with StructureMap any IAC container that can support this scenario will be welcome.)
Thanks