共用方式為


ContractBasedImportDefinition.Constraint 屬性

定義

取得運算式,這個運算式定義必須滿足才能符合此匯入定義所描述之匯入的條件。

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

屬性值

包含 Func<T,TResult> 物件的運算式,這個物件定義必須符合的條件,讓 ImportDefinition 可以滿足 Export

備註

這個屬性會傳回表示式,這個表達式會根據 ContractNameRequiredTypeIdentityRequiredMetadataRequiredCreationPolicy 屬性定義條件。

適用於