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

python - What's the Pythonic way to report nonfatal errors in a parser? -

angular - Converting AngularJS deffered promise to AngularX observable for JSOM -

php - curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to domain.com:443 -