How do I inject the name "Tommy" into the Name
property of Bar when instantiating / activating a Foo
object?
class Foo
{
public Bar Bar { get; set; }
public Foo(Bar b) { Bar = b; }
}
class Bar
{
[Inject]
public string Name { get; set; }
}
kernel.Bind<Bar>().ToSelf().WithPropertyValue("Name", "Tommy");