Lets say we have a class X like this:
class X
{
X(Z a, Z b)
{ }
}
And the Z class would have a Y dependency:
class Z
{
Z(Y c)
{ }
}
What's the proper way to bind these classes such that two instances of Z, each of them with a different instance of Y, get injected into X?
I know these have to do with Context Binding, but I'm not sure how to go about it.
EDIT:
The Y class would be:
class Y
{
Y(string someString)
{ }
}
I want the two instances of Y with a different string as well.
Thanks