This documentation is archived and is not being maintained.

PolicyActivity.RuleSetReference Property

Gets or sets a reference to a RuleSet in the .rules file.

Namespace: System.Workflow.Activities
Assembly: System.Workflow.Activities (in system.workflow.activities.dll)

public RuleSetReference RuleSetReference { get; set; }
/** @property */
public RuleSetReference get_RuleSetReference ()

/** @property */
public void set_RuleSetReference (RuleSetReference value)

public function get RuleSetReference () : RuleSetReference

public function set RuleSetReference (value : RuleSetReference)

Not applicable.

Property Value

A RuleSetReference to a RuleSet in the .rules file.

The following code example demonstrates how to create a new instance of the PolicyActivity class and set its properties. 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.Name = "SimplePolicyWorkflow";
this.Completed += new System.EventHandler(this.WorkflowCompleted);
this.CanModifyActivities = false;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0