Hi,
I have the following classes:
class Repository : IRepository
class ReadOnlyRepository : Repository
abstract class Command
abstract CommandImpl : Command
{
public CommandImpl(Repository repository){}
}
class Service
{
public Service (Command[] commands){}
}
I register them in code as follows:
var container = new Container("WindsorCOntainer.config");
var container = new WindsorContainer(new XmlInterpreter("WindsorConfig.xml"));
container.Kernel.Resolver.AddSubResolver(new ArrayResolver(container.Kernel));
container.AddComponent("repository", typeof(RentServiceRepository));
container.Resolve<RentServiceRepository>();
container.AddComponent("command", typeof(COmmandImpl));
container.AddComponent("rentService", typeof (RentService));
container.Resolve<RentService>(); // Fails here
I get the message that "RentService is waiting for dependency commands"
What am I doing wrong?
Thanks,