Export collection as it is multiple type export

Jan 15, 2010 at 7:28 AM

Is there a way to decorate Export upon type that exposes Array or IEnumerable to expose
the collection as separate export?
Something like the following code when I expecting the MyStrings (import)
will get “Exp1” , “Exp2” , “Exp3” , “Exp4”
[ExportCollection(typeof(string))]
public class MyExport0 : List<string>
{
    public MyExport0()
    {
        base.Add("Exp3");
        base.Add("Exp3");
    }
}
public class MyExport1
{
    [ExportCollection(typeof(string))]
    public string[] GetString()
    {
        return new[] { "Exp1", "Exp2" };
    }
}
public class MyImport : List<string>
{
    [ImportMany]
    public string[] MyStrings { get; set; }
}