i have difficulties getting my registration in AutoFac done.
Let`s say i have the following classes
class Foo : IFoo
{
public Foo(string test, IBar bar) {}
}
class Bar : IBar
{
public Bar(bool someFlag) {}
}
The issue I'm having now is that i don't know how to set this boolean 'someFlag' while resolving. I am only able to create these objects and fill in the flag while resolving, not while registering the classes. Note: This is just an easy example to show the problem. In my case there are half a dozen classes in between Foo and Bar.
Can anyone please help me?
I know how to fill a parameter directly like the string 'test'. But I don`t understand how i pass the boolean through Foo to Bar.