title: How can I get a MEF exported value by a class name?
body: <p>I have a window called <code>MainWindow</code> and a viewmodel called <code>MainWindowViewModel</code>.</p>
  
  <p>I want to look into MEF's container to see if I can find <code>&lt;WindowName&gt;ViewModel</code>.</p>
  
  <p>The code I have is:</p>
  
  <pre><code>CompositionContainer container;
  
  var catalog = new AssemblyCatalog(typeof(App).Assembly);
  container = new CompositionContainer(catalog);
  container.ComposeParts(this);
  container.SatisfyImportsOnce(this);
  </code></pre>
  
  <p>I saw the method</p>
  
  <pre><code>container.GetExports(Type, Type, String)
  </code></pre>
  
  <p>but it only allows me to get exports of the first <code>Type</code> parameter. All I have is a string name.</p>
  
  <p>I wanted to do something like</p>
  
  <pre><code>allExports.FirstOrDefault(e =&gt; e.GetType().Name.StartsWith(something))
  </code></pre>
  
  <p>Is there a way I can get an exported value by a <code>string name</code>?</p>