RuleValidation 建構函式

定義

初始化 RuleValidation 類別的新執行個體。

多載

RuleValidation(Type, ITypeProvider)

使用 RuleValidationType,初始化 Rule 類別的新執行個體。

RuleValidation(Activity, ITypeProvider, Boolean)

使用指定的 RuleValidation 和型別提供者,初始化 Activity 類別的新執行個體。

RuleValidation(Type, ITypeProvider)

使用 RuleValidationType,初始化 Rule 類別的新執行個體。

public:
 RuleValidation(Type ^ thisType, System::Workflow::ComponentModel::Compiler::ITypeProvider ^ typeProvider);
public RuleValidation (Type thisType, System.Workflow.ComponentModel.Compiler.ITypeProvider typeProvider);
new System.Workflow.Activities.Rules.RuleValidation : Type * System.Workflow.ComponentModel.Compiler.ITypeProvider -> System.Workflow.Activities.Rules.RuleValidation
Public Sub New (thisType As Type, typeProvider As ITypeProvider)

參數

thisType
Type

將針對這個 RuleConditionRuleSet 執行的物件型別。 一般而言,它會是工作流程,但也可以是任何有效型別。

typeProvider
ITypeProvider

選擇性的 ITypeProvider 實作,用來判斷何種 Type 可在條件中使用。 如果沒有指定,則只能使用活動所指定組件及其所參考之任何組件中的型別。

例外狀況

thisType 為 null 參考 (在 Visual Basic 中為 Nothing)。

適用於

RuleValidation(Activity, ITypeProvider, Boolean)

使用指定的 RuleValidation 和型別提供者,初始化 Activity 類別的新執行個體。

public:
 RuleValidation(System::Workflow::ComponentModel::Activity ^ activity, System::Workflow::ComponentModel::Compiler::ITypeProvider ^ typeProvider, bool checkStaticType);
public RuleValidation (System.Workflow.ComponentModel.Activity activity, System.Workflow.ComponentModel.Compiler.ITypeProvider typeProvider, bool checkStaticType);
new System.Workflow.Activities.Rules.RuleValidation : System.Workflow.ComponentModel.Activity * System.Workflow.ComponentModel.Compiler.ITypeProvider * bool -> System.Workflow.Activities.Rules.RuleValidation
Public Sub New (activity As Activity, typeProvider As ITypeProvider, checkStaticType As Boolean)

參數

activity
Activity

Activity,於其中執行 RuleConditionRuleSet 內容。 在大部分的情況下,這將會是工作流程物件。

typeProvider
ITypeProvider

選擇性的 ITypeProvider 實作,用來判斷何種 Type 可在條件中使用。 如果沒有指定,則只能使用活動所指定組件及其所參考之任何組件中的型別。

checkStaticType
Boolean

如果為 true,則任何 RuleConditionRuleSet 所使用由此物件驗證的型別必須在所允許型號的限制清單中。

例外狀況

activity 為 null 參考 (在 Visual Basic 中為 Nothing)。

備註

這個建構函式於設計階段中使用。

適用於