Share via


ExportProvider.GetExports Method (ImportDefinition, AtomicComposition)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets all exports that match the conditions of the specified import definition and composition.

Namespace:  System.ComponentModel.Composition.Hosting
Assembly:  System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)

Syntax

'Declaration
Public Function GetExports ( _
    definition As ImportDefinition, _
    atomicComposition As AtomicComposition _
) As IEnumerable(Of Export)
public IEnumerable<Export> GetExports(
    ImportDefinition definition,
    AtomicComposition atomicComposition
)

Parameters

Return Value

Type: System.Collections.Generic.IEnumerable<Export>
A collection of all the Export objects matching the condition specified by definition and atomicComposition.

Exceptions

Exception Condition
ImportCardinalityMismatchException

Cardinality is ExactlyOne and there are zero Export objects that match the conditions of the specified ImportDefinition.

-or-

Cardinality is ZeroOrOne or ExactlyOne and there is more than one Export object that matches the conditions of the specified ImportDefinition.

ArgumentNullException

definition is nulla null reference (Nothing in Visual Basic).

-or-

atomicComposition is nulla null reference (Nothing in Visual Basic).

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.