Getting an export from an MEF container given only a Type instance

后端 未结 2 384
灰色年华
灰色年华 2020-12-30 07:25

I have a scenario where I have to get an export from my CompositionContainer instance but I only have a Type to work with; I don\'t know the type at compile time, hence I ca

2条回答
  •  感情败类
    2020-12-30 08:01

    Create the call dynamically using Type.MakeGeneric.....

    http://geekswithblogs.net/marcel/archive/2007/03/24/109722.aspx

提交回复
热议问题