Will open generics be supported in MEF 1.0?

Jul 29, 2009 at 5:03 PM

Hello,

Disclaimer: I am using MEF Preview 5, so if something has changed in Preview 6, please let me know and forgive me for posting on Preview 5. :)

I ran into a road block yesterday. Specifically, the use of open generics. I started looking into if MEF supports it and it appears it does not. Based on this thread:

http://mef.codeplex.com/Thread/View.aspx?ThreadId=50504

But, then I saw this post and Glenn's response:

http://ayende.com/Blog/archive/2009/03/22/mef-open-generic-types.aspx

Which gave me some hope. :)

I am also trying to understand why MEF wouldn't support it? I understand the technical reason in the original thread, but from my point of view, if I have to bring in an IoC container to augment the composition of my application, then I'm going to take a harder look at why I would use MEF. The discoverability aspect of it is so compelling, so I hope you would strongly consider filling this gap.

My .02 cents. :)

Jul 29, 2009 at 5:29 PM

Hi ccyvas

We are looking at open generics in the future though it will not shipping in the box in V1, though it is possible something will be available out-of-band in the V1 timeframe.

Thanks

Glenn

From: ccyvas [mailto:notifications@codeplex.com]
Sent: Wednesday, July 29, 2009 9:03 AM
To: Glenn Block
Subject: Will open generics be supported in MEF 1.0? [MEF:63890]

From: ccyvas

Hello,

Disclaimer: I am using MEF Preview 5, so if something has changed in Preview 6, please let me know and forgive me for posting on Preview 5. :)

I ran into a road block yesterday. Specifically, the use of open generics. I started looking into if MEF supports it and it appears it does not. Based on this thread:

http://mef.codeplex.com/Thread/View.aspx?ThreadId=50504

But, then I saw this post and Glenn's response:

http://ayende.com/Blog/archive/2009/03/22/mef-open-generic-types.aspx

Which gave me some hope. :)

I am also trying to understand why MEF wouldn't support it? I understand the technical reason in the original thread, but from my point of view, if I have to bring in an IoC container to augment the composition of my application, then I'm going to take a harder look at why I would use MEF. The discoverability aspect of it is so compelling, so I hope you would strongly consider filling this gap.

My .02 cents. :)

Read the full discussion online.

To add a post to this discussion, reply to this email (MEF@discussions.codeplex.com)

To start a new discussion for this project, email MEF@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Aug 20, 2009 at 9:06 PM
Edited Aug 20, 2009 at 9:06 PM

Hi ccyvas

Ask and ye shall receive (in MEF contrib) :-) Check this post out: http://codebetter.com/blogs/glenn.block/archive/2009/08/20/open-generic-support-in-mef.aspx

Regards

Glenn

Aug 21, 2009 at 2:38 PM

Hi Glenn,

Excellent! I will pull it down this weekend and refactor. I brought in an IoC container to fill the gap, but I'd rather roll with one solution. Also, I've been following your posts, so I appreciate what you have done here. Excellent effort!

Chris