This documentation is archived and is not being maintained.
RuleSetDialog Class
Visual Studio 2008
This dialog is normally used by PolicyActivity to edit rule sets. However, if you want to use a rule set outside of this activity (for example, edit a rule set for use outside of a workflow), you can use this dialog to perform the editing of the rule set.
Assembly: System.Workflow.Activities (in System.Workflow.Activities.dll)
To create a RuleSet where the "this" activity is a class of your choosing, and execute the RuleSet if OK is pressed, you could use:
RuleSet ruleSet = null; // no rule set to start with
using (RuleSetDialog dialog = new RuleSetDialog(typeof(TestClass), null, ruleSet))
{
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
ruleSet = dialog.RuleSet;
RuleValidation validation = new RuleValidation(typeof(TestClass), null);
RuleEngine engine = new RuleEngine(ruleSet, validation);
TestClass testObject = new TestClass();
engine.Execute(testObject);
}
}
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ScrollableControl
System.Windows.Forms.ContainerControl
System.Windows.Forms.Form
System.Workflow.Activities.Rules.Design.RuleSetDialog
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ScrollableControl
System.Windows.Forms.ContainerControl
System.Windows.Forms.Form
System.Workflow.Activities.Rules.Design.RuleSetDialog
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: