ExportProvider.GetExportsCore(ImportDefinition, AtomicComposition) 方法

定义

获取与指定的定义所定义的约束匹配的所有导出。

protected:
 abstract System::Collections::Generic::IEnumerable<System::ComponentModel::Composition::Primitives::Export ^> ^ GetExportsCore(System::ComponentModel::Composition::Primitives::ImportDefinition ^ definition, System::ComponentModel::Composition::Hosting::AtomicComposition ^ atomicComposition);
protected abstract System.Collections.Generic.IEnumerable<System.ComponentModel.Composition.Primitives.Export> GetExportsCore (System.ComponentModel.Composition.Primitives.ImportDefinition definition, System.ComponentModel.Composition.Hosting.AtomicComposition atomicComposition);
protected abstract System.Collections.Generic.IEnumerable<System.ComponentModel.Composition.Primitives.Export>? GetExportsCore (System.ComponentModel.Composition.Primitives.ImportDefinition definition, System.ComponentModel.Composition.Hosting.AtomicComposition? atomicComposition);
abstract member GetExportsCore : System.ComponentModel.Composition.Primitives.ImportDefinition * System.ComponentModel.Composition.Hosting.AtomicComposition -> seq<System.ComponentModel.Composition.Primitives.Export>
Protected MustOverride Function GetExportsCore (definition As ImportDefinition, atomicComposition As AtomicComposition) As IEnumerable(Of Export)

参数

definition
ImportDefinition

定义要返回的 Export 对象的条件的对象。

atomicComposition
AtomicComposition

组合的事务性容器。

返回

一个包含与指定的条件匹配的所有导出的集合。

注解

此方法的替代不应将基数相关的不匹配视为错误,并且不应在这些情况下引发异常。 例如,如果 CardinalityExactlyOne ,并且没有 Export 与指定 ImportDefinition的条件匹配的对象,则应返回空 IEnumerable<T> 集合。

适用于