title: How to set ExportMetaData with multiple values as well as single w/ custom attribute?
body: <p>I have the following ExportMetaData attributes set on my class:</p>
  
  <pre><code>  [Export(typeof(IDocumentViewer))]
    [ExportMetadata("Name", "MyViewer")]
    [ExportMetadata("SupportsEditing", true)]
    [ExportMetadata("Formats", DocFormat.DOC, IsMultiple = true)]
    [ExportMetadata("Formats", DocFormat.DOCX, IsMultiple = true)]
    [ExportMetadata("Formats", DocFormat.RTF, IsMultiple = true)]  
  </code></pre>
  
  <p>I also have a supporting interface:</p>
  
  <pre><code>  public interface IDocumentViewerMetaData {
      /// &lt;summary&gt;
      /// Gets the format.
      /// &lt;/summary&gt;
      /// &lt;value&gt;The format.&lt;/value&gt;
      IEnumerable&lt;DocFormat&gt; Formats { get; }
      /// &lt;summary&gt;
      /// Gets the name of the viewer
      /// &lt;/summary&gt;
      /// &lt;value&gt;The name.&lt;/value&gt;
      string Name { get; }
      /// &lt;summary&gt;
      /// Gets a value indicating whether this viewer supports editing
      /// &lt;/summary&gt;
      /// &lt;value&gt;&lt;c&gt;true&lt;/c&gt; if [supports editing]; otherwise, &lt;c&gt;false&lt;/c&gt;.&lt;/value&gt;
      bool SupportsEditing { get; }
    }
  </code></pre>
  
  <p>And of course my ImportMany:</p>
  
  <pre><code>[ImportMany(typeof(IDocumentViewer))]
  public IEnumerable&lt;Lazy&lt;IDocumentViewer, IDocumentViewerMetaData&gt;&gt; _viewers { get; set; }
  </code></pre>
  
  <p>What I would like to do is use a strongly-typed attribute class instead of using the ExportMetaData attribute.  I have not figured out a way to do this while also supporting single values (Name, SupportsEditing, in the example above).</p>
  
  <p>I envision doing something similiar the following (or whatever is suggested as best):</p>
  
  <pre><code>[Export(typeof(IDocumentViewer))]
  [DocumentViewerMetadata(Name = "MyViewer")]
  [DocumentViewerMetadata(SupportsEditing = true)]
  [DocumentViewerMetadata(Format = DocFormat.DOC)]
  [DocumentViewerMetadata(Format = DocFormat.DOCX)]
  </code></pre>
  
  <p>I am fairly certain that there IS a way to do this, I just haven't found the right way to connect the dots. :)</p>