我想在设施加载之前在我的Windsor容器中注册一些组件 - (这样我就可以使用设施中的一些组件)
我当时认为应该有一些方法来初始化windsor而没有配置文件,注册一些组件,然后只加载配置? - 这会导致我的配置设施只有在我注册了我的组件后才会加载。
例如:
var container = new WindsorContainer();
//Register a custom component, which will be used in some of the facilities
container.Register(Component.For<IMyService>().ImplementedBy<MyService>());
//Now load via the configuration - unfortunately the method "Configure" doesn't exist
container.Configure(new XmlInterpreter(new ConfigResource("castle")));
感谢您的任何帮助,
谢谢!