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

go - serving up pdfs using golang -

python - Best design pattern for collection of objects -

r - Using `bbmle:mle2` with vector parameters (already works using `optim`) -