title: MEF with ImportMany and ExportMetadata
body: <p>I've just started playing around with Managed Extensibility framework. I've got a class that's exported and a import statement:</p>
  
  <pre><code>[Export(typeof(IMapViewModel))]
  [ExportMetadata("ID",1)]
  public class MapViewModel : ViewModelBase, IMapViewModel
  {
  }
  
      [ImportMany(typeof(IMapViewModel))]
      private IEnumerable&lt;IMapViewModel&gt; maps;
  
      private void InitMapView()
      {
          var catalog = new AggregateCatalog();
          catalog.Catalogs.Add(new AssemblyCatalog(typeof(ZoneDetailsViewModel).Assembly));
          CompositionContainer container = new CompositionContainer(catalog);
  
          container.ComposeParts(this);
          foreach (IMapViewModel item in maps)
          {
              MapView = (MapViewModel)item;                
          }
      }
  </code></pre>
  
  <p>This works just fine. The IEnumerable get the exported classes. No I try to change this to use the Lazy list and include the metadata so that I can filter out the class that i need (same export as before)</p>
  
  <pre><code>[ImportMany(typeof(IMapViewModel))]
      private IEnumerable&lt;Lazy&lt;IMapViewModel,IMapMetaData&gt;&gt; maps;
  
      private void InitMapView()
      {
          var catalog = new AggregateCatalog();
          catalog.Catalogs.Add(new AssemblyCatalog(typeof(ZoneDetailsViewModel).Assembly));
          CompositionContainer container = new CompositionContainer(catalog);
  
          container.ComposeParts(this);
          foreach (Lazy&lt;IMapViewModel,IMapMetaData&gt; item in maps)
          {
              MapView = (MapViewModel)item.Value;
          }            
      }
  </code></pre>
  
  <p>After this the Ienumerable has no elements. I suspect that i've made an obvious and stupid mistake somewhere.. </p>