How to register my service as a global service or how can I use MEF in my scenario?

前端 未结 1 591
刺人心
刺人心 2021-01-28 00:19

I would like to create my own service with global visibility. To implement that, I followed this sample solution.

Everything goes well, I can call my service within a cla

相关标签:
1条回答
  • 2021-01-28 01:07

    You should use MEF to composes services for your extensions; not the old COM-based ServiceProvider stuff.

    Put all of your actual code in MEF-exported classes, then invoke them from the package class using the SComponentModel service.

    For more information, see my blog.

    0 讨论(0)
提交回复
热议问题