开发者

initialize castle container from a stream (not file)

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜