Optional ExportMetadata?

Jul 30, 2009 at 4:26 PM

Is there a way to mark ExportMetadata as optional or at least have the MetadataView construction not throw exceptions for missing metadata?  Some our exports have meta data that is only used depending the values of other metdata.  It is somewhat of a pain to provide values for the unused metadata.  It also seems desirable to be able to extend the contract with additional metadata in future versions without breaking older extensions.   We are currently using Preview 4, and we are looking forward to switching to Preview 6 soon.  Thanks for the Silverlight version.

Jul 30, 2009 at 4:28 PM

Place [DefaultValue(x)] on the optional members of your metadata view. See the last section of http://mef.codeplex.com/Wiki/View.aspx?title=Exports%20and%20Metadata&referringTitle=Home

From: ccifra [mailto:notifications@codeplex.com]
Sent: Thursday, July 30, 2009 8:26 AM
To: Nicholas Blumhardt
Subject: Optional ExportMetadata? [MEF:64006]

From: ccifra

Is there a way to mark ExportMetadata as optional or at least have the MetadataView construction not throw exceptions for missing metadata? Some our exports have meta data that is only used depending the values of other metdata. It is somewhat of a pain to provide values for the unused metadata. It also seems desirable to be able to extend the contract with additional metadata in future versions without breaking older extensions. We are currently using Preview 4, and we are looking forward to switching to Preview 6 soon. Thanks for the Silverlight version.

Read the full discussion online.

To add a post to this discussion, reply to this email (MEF@discussions.codeplex.com)

To start a new discussion for this project, email MEF@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com