次の方法で共有


ExportProvider.GetExports Method (ImportDefinition)

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

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

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

Syntax

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

Parameters

Return Value

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

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).

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.