CompositeRuleset Checked-in

Topics: Development Team Discussion, User Discussion
Sep 16, 2007 at 3:53 PM
Here's a first draft (meaning no comments and almost no UTs) at a CompositeRulesetValidator.

It allows composition of rulesets into higher rulesets.

One think I am wondering is wheter or not it could be useful to be able to specify the CompositionType of rulesets, the same way it works with validators.

[CompositeRuleSetValidator(Ruleset="NewCustomer", TargetRulesets="Named,Reachable")]
[CompositeRuleSetValidator(Ruleset="CustomerWithOrders", TargetRulesets="NewCustomer,Billable")]
public class Customer
public string Name;

public Address Address;

public Account Account;

Any thougths?
Sep 17, 2007 at 10:33 AM
Cool. seriously!

I'll have a brief look into whether some of this can share code with the ExternallyConfigurableObjectValidator (since from the first look of it both seem to tackle a similar problem).
am i right?

Sep 17, 2007 at 12:09 PM
Actually you are right.

If you use the CompositeRuleSet and specify a ConfigurationSourceName which happens to be configured as a FileConfigurationSource in you app settings AND specify a single target rule set in the TargetRuleSets property, you obtain equivalent behavior.
Sep 25, 2007 at 8:47 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.