I have an INightlyProcess interface and 6 classes that implement it.
I have a NightlyProcessInstaller that installs all 6 classes (and I
can see them inside the kernel):
public class NightlyProcessesAppInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container,
IConfigurationStore store)
{
container.Kernel.Resolver.AddSubResolver(
new ArrayResolver(container.Kernel));
container.Register(AllTypes.FromAssembly(Assembly.GetExecutingAssembly())
.BasedOn<INightlyProcess>()
.WithService.FromInterface(typeof
(INightlyProcess))
.Configure(c =>
c.Named(c.Implementation.Name)));
}
}
And I have a class that requires an array of nightlyprocesses:
public class NightlyMaintenance
{
private readonly INightlyProcess[] _processes;
public NightlyMaintenance(INightlyProcess[] processes)
{
_processes = processes;
}
}
BUT, when the container resolves NightlyMaintenance, it's only
injecting 3 of the 6 NightlyProcesses. Examination of these shows me
that it's only injecting the processes that have constructors with a
single parameter. Any process that with a constructor having two or
more parameters is not injected.
Can anyone see what I'm doing wrong?
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.