Here is how my assembly (TestAssembly) looks
Class BaseClass
{
....
....
}
Interface I1
{
....
....
}
Interface I2 : I1
{
....
....
}
Interface I3 : I1
{
....
....
}
Class A : BaseClass, I2
{
....
....
}
Class B : BaseClass, I3
{
....
....
}
I am using Castle Windsor to Register and Resolve all these components.
container.Register(AllTypes.FromAssemblyNamed("TestAssembly")
.BasedOn<I1>()
.LifestyleSingleton());
Down the line I am trying to ResolveAll Types of I1 (Interface I1) using
container.ResolveAll<I1>();
in hopes of getting an array of objects A and B. Instead I get an empty array. Whats wrong?
I believe you need to tell the container which services to associate with the interface, something like: