ContractBasedImportDefinition.Constraint Property

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

Gets an expression that defines conditions that must be matched to satisfy the import described by this import definition.

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

Syntax

'Declaration
Public Overrides ReadOnly Property Constraint As Expression(Of Func(Of ExportDefinition, Boolean))
public override Expression<Func<ExportDefinition, bool>> Constraint { get; }

Property Value

Type: System.Linq.Expressions.Expression<Func<ExportDefinition, Boolean>>
An expression that contains a Func<T, TResult> object that defines the conditions that must be matched for the ImportDefinition to be satisfied by an Export.

Remarks

This property returns an expression that defines conditions based on the ContractName and RequiredMetadata properties.

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.