protected override IEnumerable <MefV1.Primitives.Export> GetExportsCore(MefV1.Primitives.ImportDefinition definition, MefV1.Hosting.AtomicComposition atomicComposition) { var result = base.GetExportsCore(definition, atomicComposition); if ((definition.Cardinality == MefV1.Primitives.ImportCardinality.ExactlyOne && result.Count() != 1) || (definition.Cardinality == MefV1.Primitives.ImportCardinality.ZeroOrOne && result.Count() > 1)) { // Set breakpoint here } return(result); }
protected override IEnumerable <MefV1.Primitives.Export> GetExportsCore(MefV1.Primitives.ImportDefinition definition, MefV1.Hosting.AtomicComposition atomicComposition) { var v3ImportDefinition = WrapImportDefinition(definition); var result = ImmutableList.CreateBuilder <MefV1.Primitives.Export>(); var exports = this.exportProvider.GetExports(v3ImportDefinition); return(exports.Select(UnwrapExport).ToArray()); }