Import Cardinality, and Picking Which Export to Use

In the Managed Extensibility Framework (MEF), an import has a cardinality, which expresses how many exports can be used to satisfy the import.  The possible values are ZeroOrOne, ExactlyOne, or ZeroOrMore, and they can be declared in the following ways: [Import(AllowDefault = true)] IService ZeroOrOneImport { get; set; } [Import] IService ExactlyOneImport { get; set;…

0