ImportDefinition Constructor (Expression<Func<ExportDefinition, Boolean>>, String, ImportCardinality, Boolean, Boolean)

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

Initializes a new instance of the ImportDefinition class with the specified constraint, contract name, cardinality, a value that indicates whether the import definition is recomposable, and a value that indicates whether the import definition is a prerequisite.

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

Syntax

'Declaration
Public Sub New ( _
    constraint As Expression(Of Func(Of ExportDefinition, Boolean)), _
    contractName As String, _
    cardinality As ImportCardinality, _
    isRecomposable As Boolean, _
    isPrerequisite As Boolean _
)
public ImportDefinition(
    Expression<Func<ExportDefinition, bool>> constraint,
    string contractName,
    ImportCardinality cardinality,
    bool isRecomposable,
    bool isPrerequisite
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

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

ArgumentException

cardinality is not one of the values of ImportCardinality.

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.