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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -