共用方式為


RuleSetReference.RuleSetName 屬性

定義

取得或設定活動要評估之 RuleSet 的名稱。

public:
 property System::String ^ RuleSetName { System::String ^ get(); void set(System::String ^ value); };
public string RuleSetName { get; set; }
member this.RuleSetName : string with get, set
Public Property RuleSetName As String

屬性值

String

活動要評估之 RuleSet 的名稱。

範例

下列程式碼範例示範如何建立 RuleSetReference 類別的新執行個體,並將其設定為 PolicyActivity.RuleSetReference 屬性的值。 這個程式碼範例是 SimplePolicyWorkflow.designer.cs 檔案中<RuleActionTrackingEventSample SDK>範例的一部分。 如需詳細資訊,請參閱 RuleActionTrackingEvent 範例

this.CanModifyActivities = true;
System.Workflow.Activities.Rules.RuleSetReference rulesetreference1 = new System.Workflow.Activities.Rules.RuleSetReference();
this.simpleDiscountPolicy = new System.Workflow.Activities.PolicyActivity();
//
// simpleDiscountPolicy
//
this.simpleDiscountPolicy.Name = "simpleDiscountPolicy";
rulesetreference1.RuleSetName = "DiscountRuleSet";
this.simpleDiscountPolicy.RuleSetReference = rulesetreference1;
//
// SimplePolicyWorkflow
//
this.Activities.Add(this.simpleDiscountPolicy);
this.Name = "SimplePolicyWorkflow";
this.Completed += new System.EventHandler(this.WorkflowCompleted);
this.CanModifyActivities = false;
Me.CanModifyActivities = True
Dim rulesetreference1 As System.Workflow.Activities.Rules.RuleSetReference = New System.Workflow.Activities.Rules.RuleSetReference
Me.simpleDiscountPolicy = New System.Workflow.Activities.PolicyActivity
' 
' simpleDiscountPolicy
' 
Me.simpleDiscountPolicy.Name = "simpleDiscountPolicy"
rulesetreference1.RuleSetName = "DiscountRuleSet"
Me.simpleDiscountPolicy.RuleSetReference = rulesetreference1
' 
' SimplePolicyWorkflow
' 
Me.Activities.Add(Me.simpleDiscountPolicy)
Me.Name = "SimplePolicyWorkflow"
AddHandler Completed, AddressOf Me.OnWorkflowCompleted
Me.CanModifyActivities = False

適用於