Quantcast
Channel: Managed Extensibility Framework
Viewing all articles
Browse latest Browse all 265

New Post: PartMetadata vs. ExportMetadata

$
0
0

Just in case someone stumbles upon this thread, the above answer is outdated. PartMetadata is used in the implementation of open-generics (and possibly other places I am not aware of).

When using open generics to export a part, two keys are added to the part's metadata dictionary:

  1. "System.ComponentModel.Composition.IsGenericPart" - set to "true" for open generics
  2. "System.ComponentModel.Composition.GenericPartArity" - set to the number of type parameters in the generic part.

These entries are handled internally by MEF, so there's no special need to know this unless you're trying to do some low-level stuff.


Viewing all articles
Browse latest Browse all 265

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>