Edit

Share via


ContractBasedImportDefinition.Constraint Property

Definition

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

public:
 virtual property System::Linq::Expressions::Expression<Func<System::ComponentModel::Composition::Primitives::ExportDefinition ^, bool> ^> ^ Constraint { System::Linq::Expressions::Expression<Func<System::ComponentModel::Composition::Primitives::ExportDefinition ^, bool> ^> ^ get(); };
public override System.Linq.Expressions.Expression<Func<System.ComponentModel.Composition.Primitives.ExportDefinition,bool>> Constraint { get; }
member this.Constraint : System.Linq.Expressions.Expression<Func<System.ComponentModel.Composition.Primitives.ExportDefinition, bool>>
Public Overrides ReadOnly Property Constraint As Expression(Of Func(Of ExportDefinition, Boolean))

Property Value

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, RequiredTypeIdentity, RequiredMetadata, and RequiredCreationPolicy properties.

Applies to