1

Closed

Incorrect documentation for SimpleRule

description

The ValidateRule method in SimpleRule states that the return value is "True if the rule has not been broken, or false if it has."
 
But in the ValidatingViewModelBase, the return value is mapped to a boolean named isRuleBroken, like so:
 
bool isRuleBroken = r.ValidateRule(this);
 
So either the documentation is wrong or the ValidatingViewModelBase has a bug. This caused me some confusion earlier today!
Closed Nov 27, 2011 at 5:12 PM by sachabarber
Code is fine

comments

michaelmairegger wrote Nov 29, 2011 at 2:03 PM

Code is fine, but the documentation isn't.
Should be "True if the rule has been broken, or false if it hasn't."
Because the variable that uses that method is called:
bool isRuleBroken = r.ValidateRule(this);
The user should always be aware that the returning true means that the rule is broken.

Regards,
Michael

wrote Feb 21, 2013 at 11:07 PM

wrote May 16, 2013 at 10:46 AM