Editar

Compartilhar via


RuleSetReference.RuleSetName Property

Definition

Gets or sets the name of the RuleSet that the activity evaluates.

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

Property Value

The name of the RuleSet that the activity evaluates.

Examples

The following code example shows how to create a new instance of the RuleSetReference class and set it to the value of the PolicyActivity.RuleSetReference property. This code example is part of the RuleActionTrackingEventSample SDK Sample from the SimplePolicyWorkflow.designer.cs file. For more information, see RuleActionTrackingEvent Sample.

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

Applies to