【发布时间】:2011-04-15 11:17:27
【问题描述】:
这类似于我的代码的样子
var catalog = new AssemblyCatalog(typeof(Program).Assembly);
_container = new CompositionContainer(catalog);
代码分析显示警告 CA2000:在对目录的所有引用超出范围之前调用 Dispose。
所以我不确定是否需要取消警告或将 _catalog 转换为字段 + 处理它。
MEF 文档似乎没有提到这一点。
【问题讨论】:
标签: mef