Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheckRules[Async] should respect rule priority to run rules #4235

Open
StefanOssendorf opened this issue Sep 28, 2024 · 0 comments
Open

CheckRules[Async] should respect rule priority to run rules #4235

StefanOssendorf opened this issue Sep 28, 2024 · 0 comments

Comments

@StefanOssendorf
Copy link
Contributor

Executing all rules of a BO should respect the rule priority given during rule creation.

I suspect this method must be adjusted to incorporate that:

public List<string> CheckRules()
{
if (_suppressRuleChecking)
return new List<string>();
RunningRules = true;
var affectedProperties = CheckObjectRules(RuleContextModes.CheckRules, false);
var properties = TypeRules.Rules.Where(p => p.PrimaryProperty != null)
.Select(p => p.PrimaryProperty)
.Distinct();
foreach (var property in properties)
affectedProperties.AddRange(CheckRules(property, RuleContextModes.CheckRules));
RunningRules = false;
if (!RunningRules && !RunningAsyncRules)
_target.AllRulesComplete();
return affectedProperties.Distinct().ToList();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants