CastleWindsor 3.0 and DefaultServiceHostFactory.RegisterContainer()?

感情迁移 提交于 2019-12-10 12:44:44

问题


The following does not compile:

DefaultServiceHostFactory.RegisterContainer(Container.Kernel);

The static method does not seem to exist in Castle 3.0 - I checked the breakingchanges.txt and did not see this listed.

What am I missing?


回答1:


You don't need the call any more as it gets registered when you wire up the facility.

container.AddFacility<WcfFacility>();

Is all you need, sweet :)

This is not required:

DefaultServiceHostFactory.RegisterContainer(Container.Kernel);

nor is this

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



来源:https://stackoverflow.com/questions/9729395/castlewindsor-3-0-and-defaultservicehostfactory-registercontainer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!