ExportProvider.TryGetExports 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得所有符合指定進口條件的出口。
public:
bool TryGetExports(System::ComponentModel::Composition::Primitives::ImportDefinition ^ definition, System::ComponentModel::Composition::Hosting::AtomicComposition ^ atomicComposition, [Runtime::InteropServices::Out] System::Collections::Generic::IEnumerable<System::ComponentModel::Composition::Primitives::Export ^> ^ % exports);
public bool TryGetExports(System.ComponentModel.Composition.Primitives.ImportDefinition definition, System.ComponentModel.Composition.Hosting.AtomicComposition? atomicComposition, out System.Collections.Generic.IEnumerable<System.ComponentModel.Composition.Primitives.Export>? exports);
public bool TryGetExports(System.ComponentModel.Composition.Primitives.ImportDefinition definition, System.ComponentModel.Composition.Hosting.AtomicComposition atomicComposition, out System.Collections.Generic.IEnumerable<System.ComponentModel.Composition.Primitives.Export> exports);
member this.TryGetExports : System.ComponentModel.Composition.Primitives.ImportDefinition * System.ComponentModel.Composition.Hosting.AtomicComposition * seq -> bool
Public Function TryGetExports (definition As ImportDefinition, atomicComposition As AtomicComposition, ByRef exports As IEnumerable(Of Export)) As Boolean
參數
- definition
- ImportDefinition
定義要取得的 Export 物件條件的物件。
- atomicComposition
- AtomicComposition
這是創作的交易容器。
- exports
- IEnumerable<Export>
當此方法回傳時,包含一組 Export 符合條件 ImportDefinition的物件集合(若找到),則為空 IEnumerable<T> 物件。 這個參數會未初始化傳遞。
傳回
true若 是 或 且 且 零個Cardinality物件符合指定ZeroOrOne條件;ZeroOrMore若 Export 或 且 ImportDefinitiontrue 恰好有一個Cardinality物件符合指定ZeroOrOne條件;否則 。 ExactlyOneExportImportDefinitionfalse
例外狀況
definition 是 null。