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
Post a Comment