ExportProvider.TryGetExports Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets all the exports that match the conditions of the specified import.
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
Parameters
- definition
- ImportDefinition
The object that defines the conditions of the Export objects to get.
- atomicComposition
- AtomicComposition
The transactional container for the composition.
- exports
- IEnumerable<Export>
When this method returns, contains a collection of Export objects that match the conditions defined by ImportDefinition, if found; otherwise, an empty IEnumerable<T> object. This parameter is passed uninitialized.
Returns
true
if Cardinality is ZeroOrOne or ZeroOrMore and there are zero Export objects that match the conditions of the specified ImportDefinition; true
if Cardinality is ZeroOrOne or ExactlyOne and there is exactly one Export that matches the conditions of the specified ImportDefinition; otherwise, false
.
Exceptions
definition
is null
.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기