如何在Windsor安装程序中使用IConfigurationStore参数?
有一个 Install
方法>IWindsorInstallerIConfigurationStore store
参数。我在任何地方都找不到实际使用此参数的代码示例。它可以用来做什么?您能给我一个使用示例,或者指出一些使用它的代码吗?
搜索网络并没有帮助,因为 IConfigurationStore
被提到了无数次,但我没有找到任何使用它的地方。
谢谢!
The Install
method of IWindsorInstaller
has an IConfigurationStore store
parameter. I can't find anywhere a code example where this parameter is actually used. What can it be used for? Can you please give me a usage example, or point me to some code where it is used?
Searching the web doesn't help, because IConfigurationStore
is mentioned zillions of times, but I haven't found a single place where it was used.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如名称所示,它使您可以访问 Windsor 的配置(属性、组件、参数、服务覆盖等)。我想说配置在设施中比安装程序更常用,因此您可能需要查看一些设施作为参考。
作为一个人为的示例,假设您有一个安装程序,其中包含与某些 Web 服务相关的多个组件。您可以使此安装程序可配置 WRT 服务端点,以便您可以在 Castle 的 XML 配置中定义端点,从而避免在端点更改时重新编译。
Just as the name says, it gives you access to Windsor's configuration (properties, components, parameters, service overrides, etc). I'd say configuration is more commonly used in facilities than installers, so you might want to take a look at some facilities as reference.
As a contrived example, suppose you have an installer with several components related to some web service. You might make this installer configurable WRT the service endpoint so you could define the endpoint in Castle's XML config, thus avoiding recompliation if the endpoint changes.