开发者

Using Castle Windsor Installer Factory to order installers

开发者 https://www.devze.com 2023-03-05 11:38 出处:网络
I have solution where all of my windsor container registers have been moved to set of installer classes. A framework I am playing around with (SharpArchContrib) requires its components be registered f

I have solution where all of my windsor container registers have been moved to set of installer classes. A framework I am playing around with (SharpArchContrib) requires its components be registered first.

Given that I have an installer called SharpArchContribInstaller and for simplicity sake an installer called Everythin开发者_开发百科gElseInstaller, how should I implement a derived InstallerFactory and use it with the container.Install method? or if this is not the way, what is the proper way to order installer execution?

Thanks in advance for the help.


You have two ways to doing this.

Simpler one is to do:

Container.Install(
   FromAssembly.Named("Somethig"),
   FromAssembly.AllTheRestAsPerYourRequirements());

That is split this thing out if possible. If not go with InstallerFactory.

0

精彩评论

暂无评论...
验证码 换一张
取 消