Choosing between MEF and MAF (System.AddIn)

前端 未结 7 2230
伪装坚强ぢ
伪装坚强ぢ 2020-11-22 10:05

The Managed Extensibility Framework (MEF) and Managed AddIn Framework (MAF, aka System.AddIn) seem to accomplish very similar tasks. According to this Stack Overflow questio

7条回答
  •  我在风中等你
    2020-11-22 10:52

    MAF and MEF both can use AppDomains and both can load/unload dll in runtime. However the differences I have found are: MAF AddIns are decoupled, MEF components are loose coupled; MAF "Activates" (new instance) while MEF makes instances by default.

    With MEF you can use Generics to make GenericHost for any contract. This means the MEF load/unload and component management can be in a common library and used generically.

提交回复
热议问题