Registering multiple typed factories in the Castle Windsor container
I am trying to register all of my typed factories in Castle Windsor using
a single registration. All of my factories implement IModelFactory so I
would like to be able to write something like:
container.Register(Types.FromThisAssembly()
.BasedOn<IModelFactory>()
.AsFactory());
The BasedOn method returns a type BasedOnDescriptor which does not allow
me to call the AsFactory() extension method.
Do I really need to register all typed factories one by one?
No comments:
Post a Comment