开发者

initialize castle container from a stream (not file)

开发者 https://www.devze.com 2022-12-16 20:31 出处:网络
Is it pos开发者_JAVA技巧sible to initialize a castle container (windsor) by passing a stream to

Is it pos开发者_JAVA技巧sible to initialize a castle container (windsor) by passing a stream to the XmlInterpreter somehow? It appears that the current implementation only supports files. thanx, -tzurs


Inherit from AbstractStreamResource, then you can do:

var c = new WindsorContainer(new XmlInterpreter(new MyStreamResource(...)));

See FileResource for guidance.

0

精彩评论

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

关注公众号