caSTLe-windsor - CaSTLeWindsor 3.0和DefaultServiceHostFactory.RegisterContainer()?

标签 castle-windsor wcffacility windsor-3.0

以下内容无法编译:

DefaultServiceHostFactory.RegisterContainer(Container.Kernel);

静态方法似乎在CaSTLe 3.0中不存在-我检查了breakingchanges.txt,但未看到此列表。

我想念什么?

最佳答案

当您接通设施的电话时,您将不再需要该调用,因为该调用已被注册。

container.AddFacility<WcfFacility>();

是您所需要的,甜蜜的:)

这不是必需的:

DefaultServiceHostFactory.RegisterContainer(Container.Kernel);

这也不是

Container.Register(Component.For <DefaultServiceHostFactory>());

关于caSTLe-windsor - CaSTLeWindsor 3.0和DefaultServiceHostFactory.RegisterContainer()?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9729395/

相关文章:

c# - 带有 CaSTLe Windsor 的 Winforms MVP - 子窗体的 DI?

c# - 将 Windsor CaSTLe IoC 用于 Windows 服务

wcf - 生产服务器上的偶尔错误 : Method <name> is not supported on this proxy

wcf - CaSTLe WCF 设施,对非通用合约使用通用接口(interface)

dependency-injection - 如何使用 caSTLe windsor wcf 设施注册我的所有服务

c# - IoC 容器解决了 DbContext(EF) 导致实体中子对象的急切加载

c# - 限制 Windsor 容器解析基于的对象

c# - 依赖注入(inject)链接两个对象

c# - 具有流畅界面的 CaSTLe 拦截器

caSTLe-windsor - CaSTLe Scoped Lifestyle 不起作用