What's the difference between CompositionBatch and catalogs?

余生长醉 提交于 2019-12-01 19:55:13

If a type is in a catalog, MEF will create an object of that type when needed. A CompositionBatch lets you add objects to the composition that you've created yourself. We recommend sticking to catalogs in general, but there are situations where you need to create an object yourself, or it is created by some other component (for example the XAML parser) and you need to put it in the container.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!