RuleSetReference Constructor (String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the RuleSetReference class using the name of the RuleSet.

Namespace:   System.Workflow.Activities.Rules
Assembly:  System.Workflow.Activities (in System.Workflow.Activities.dll)

public RuleSetReference(
	string ruleSetName
)

Parameters

ruleSetName
Type: System.String

The name of the RuleSet that the activity evaluates.

The following code example shows how to create a new instance of the RuleSetReference class using the name of a RuleSet. This code example is part of the Policy SDK Sample from the DiscountPolicyWorkflow.Designer.cs file. For more information, seeAdvanced Policy.

public sealed partial class DiscountPolicyWorkflow
{
    [System.Diagnostics.DebuggerNonUserCode()]
    private void InitializeComponent()
    {
        this.CanModifyActivities = true;
        System.Workflow.Activities.Rules.RuleSetReference rulesetreference1 = new System.Workflow.Activities.Rules.RuleSetReference();
        this.advancedDiscountPolicy = new System.Workflow.Activities.PolicyActivity();
        // 
        // advancedDiscountPolicy
        // 
        this.advancedDiscountPolicy.Name = "advancedDiscountPolicy";
        rulesetreference1.RuleSetName = "DiscountRuleSet";
        this.advancedDiscountPolicy.RuleSetReference = rulesetreference1;
        // 
        // DiscountPolicyWorkflow
        // 
        this.Activities.Add(this.advancedDiscountPolicy);
        this.Name = "DiscountPolicyWorkflow";
        this.Completed += new System.EventHandler(this.WorkflowCompleted);
        this.CanModifyActivities = false;

    }

    private PolicyActivity advancedDiscountPolicy;
}

.NET Framework
Available since 3.0
Return to top
Show: