I cannot get Castle Windsor (3.0) to resolve an array. I've done it before and I have other arrays resolved, so this is confounding.
First I add a CollectionResolver
, which does arrays
_container.Kernel.Resolver.AddSubResolver(new CollectionResolver(_container.Kernel));
Then, I register all my classes based on this interface, of which there are about 6
container.Register(AllTypes.FromThisAssembly().BasedOn<ISearchSource>());
They are definitely in the same assembly and in the debugger, I can see these classes are in the list of components eg.
public class ViewsSearchSource : ISearchSource {...}
Yet in the class that resolves this, like this...
public SearchBot(ISearchSource[] searchSources)
I get
'SearchBot' is waiting for the following dependenciesService 'ISearchSource[]' which was not registered.
I've even tried adding an ArrayResolver
(as well as CollectionResolver
) explicitly. Same error.
What am I missing here?