protected void Validate(Type type) { this.m_RuleValidation = new System.Workflow.Activities.Rules.RuleValidation(type, null); this.m_RuleSet.Validate(this.m_RuleValidation); System.Workflow.ComponentModel.Compiler.ValidationErrorCollection errors = this.m_RuleValidation.Errors; if (errors.Count > 0) { throw new Exception("There were Errors in the validation"); } }
public static void ExecuteRuleSet(System.Workflow.Activities.Rules.RuleSet ruleSet, object thisObject) { System.Workflow.Activities.Rules.RuleValidation validation = new System.Workflow.Activities.Rules.RuleValidation(thisObject.GetType(), null); ruleSet.Validate(validation); System.Workflow.ComponentModel.Compiler.ValidationErrorCollection errors = validation.Errors; if (errors.Count > 0) { System.Windows.MessageBox.Show("There were Errors in the validation"); } System.Workflow.Activities.Rules.RuleExecution execution = new System.Workflow.Activities.Rules.RuleExecution(validation, thisObject); ruleSet.Execute(execution); }
public static void ExecuteRuleSet(System.Workflow.Activities.Rules.RuleSet ruleSet, object thisObject) { System.Workflow.Activities.Rules.RuleValidation validation = new System.Workflow.Activities.Rules.RuleValidation(thisObject.GetType(), null); ruleSet.Validate(validation); System.Workflow.ComponentModel.Compiler.ValidationErrorCollection errors = validation.Errors; if (errors.Count > 0) { System.Windows.MessageBox.Show("There were Errors in the validation"); } System.Workflow.Activities.Rules.RuleExecution execution = new System.Workflow.Activities.Rules.RuleExecution(validation, thisObject); ruleSet.Execute(execution); }
protected void Validate(Type type) { this.m_RuleValidation = new System.Workflow.Activities.Rules.RuleValidation(type, null); this.m_RuleSet.Validate(this.m_RuleValidation); System.Workflow.ComponentModel.Compiler.ValidationErrorCollection errors = this.m_RuleValidation.Errors; if (errors.Count > 0) { throw new Exception("There were Errors in the validation"); } }