This project has moved and is read-only. For the latest updates, please go here.

Metadata Dictionaries

Nov 22, 2009 at 2:29 PM
Edited Nov 22, 2009 at 2:29 PM

I know there has ben some changes with metadata dictionaries, but I thought ExportMetadataAttribute still worked, you could access the metadat and retrieve it with something like this:

ImportMany()] private IEnumerable<Lazy<Contracts.ICommentator, IDictionary<string, object>>> commentators;

But, that line finds the appropriate items when I leave off the dictionary and does not find it when the IDictionary is included.

If this is no longer a valid apprach, the help for Metadata needs updating.

Nov 22, 2009 at 6:23 PM

ExportMetadataAttribute does or at least "should" still work. You should also be able to import metadata using a dictionary. Can you send me a repro?



Nov 22, 2009 at 8:59 PM

OK, I was not able to repro this, even though I was reproing it when I posted in a simple app.

My best guess is that I missed a solution recompile.

And for anyone reading... I think strongly typed metadata is vastly preferable, I just tried this while working through a demo for a talk.