How to convert Windsor lock to free config in xml

I would like to convert this fluent approach to xml:

container.Register(
    AllTypes.FromAssemblyNamed("Company.DataAccess")
        .BasedOn(typeof(IReadDao<>)).WithService.FromInterface(),
    AllTypes.FromAssemblyNamed("Framework.DataAccess.NHibernateProvider")
        .BasedOn(typeof(IReadDao<>)).WithService.Base());

      

Is there a way to do this while keeping it simple?

+2


a source to share


2 answers


There is currently no way to do batch registrations in XML. If you really want to express this in XML (I wonder why), you have to list every registered component.



The closest was the party registration tool , but it's outdated.

0


a source


You can try Binsor, which is a DSL for registering components, but I'm not entirely sure how relevant it is.



Keep in mind that what you are trying to do is not recommended and brings more headaches than the true meaning. Stick to the code.

0


a source







All Articles