11

I see work is still going on with new features on MEF (MEF Codeplex site) and they are shipping MEF 2 beta releases, however they do not have any decent documentation on what the new features are experimenting/exploring/building?

So, what are the new features (in a little bit of detail please, a sentance or two for each would be great) that are part of MEF 2?

Contango
  • 76,540
  • 58
  • 260
  • 305
Robert MacLean
  • 38,975
  • 25
  • 98
  • 152
  • 2
    To the person who marked this as not a question, I would love to hear why? This seems exactly like a question "what are the features?" it is something with a specific set of answers. I have asked for more detail which may make it feel a little off but the core is still a true question. – Robert MacLean Sep 26 '11 at 07:02

2 Answers2

5

I know one big feature is support for open generics. This allows us to import parts that look like this:

IRepository<T>
{

}

using an import that looks like this

[Import(typeof(IRepository<>))]
private IRepository<Users> userRepository;
Brian O
  • 431
  • 4
  • 3
1

From the preview documentation

  • Support for generic types.
  • Convention-based programming model that enables you to create parts based on naming conventions rather than attributes.
  • Multiple scopes.
Robert MacLean
  • 38,975
  • 25
  • 98
  • 152
  • 3
    WTF?!? Five years later and there still is no documentation on MEF2? The link provided just gives an overview of .NET 4.5 features and a link to the old MEF documentation. Where is the document that tells me how to use the new MEF2? – Quark Soup May 23 '16 at 13:11
  • 1
    @DRAirey1 considering that isn't the question the poster asked, it shouldn't be there. That link is for the question, not you. Here is the documentation for the current version MEF: https://msdn.microsoft.com/en-us/library/system.componentmodel.composition(v=vs.110).aspx – Robert MacLean May 24 '16 at 05:37