c# - Is it possible to auto register in Castle Windsor based on naming convention? -


public interface imyspecialservice {} public interface myspecialservice : imyspecialservice {} 

is possible register myspecialservice chosen implementation of imyspecialservice without having specify details of either interface or implementation? i.e. can configure castle windsor use interface name minus i?

this 1 should work you:

container.register(     classes.fromthisassembly()         .innamespace("yournamespace")         .withservice.defaultinterfaces() ); 

more here:

https://github.com/castleproject/windsor/blob/master/docs/registering-components-by-conventions.md


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -