我正在尝试遵循一些在.Net 4中使用MEF的入门指南,但是当我开始设置应用程序时,我遇到困难。该指示说要做到这一点:MEF:ComposeParts missing
var catalog = new DirectoryCatalog(@".\");
var container = new CompositionContainer(catalog);
container.Composeparts(this);
,但包括在.NET 4 System.ComponentModel.Composition的版本似乎并没有对CompositionContainer中可用的Composeparts方法,我无法找到一个很好的参考在当前系统中如何做到这一点。
下面是引用我目前正在使用: Building Composable Apps in .NET 4 with the Managed Extensibility Framework
有谁在那里有更好的参考,我应该看什么?
为什么哦为什么哦为什么它是一种扩展方法!谢谢你的回答:-) – ColinE 2011-09-30 08:15:07