-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Add new CheckRulesAsync overloads #3756
Comments
I like the new overloads. The challenge I see with cancelation tokens is that they are viral - they'd need to flow down through all the async APIs associated with rules - which also means the async data portal methods. Also, there isn't an API to cancel running rules, so how would that actually work? |
Yes. Adding There are a lot more implications to consider: |
I started working on this. What about an additional overload: |
Intuitively this makes sense. My only concern is YAGNI - is there an actual scenario where someone would use this, or is it just code we have to maintain that nobody will use? |
We have a couple of places where we invoke rules for up to four properties explicitly because we can't add them as Furthermore I'll create a proof of concept (rough outline here) for the await myBo.SetAndWaitForRules(bo => {
bo.Prop1 = xyz;
bo.Prop2 = xyz;
bo.Prop3 = xyz;
}); And the method tracks which properties were set and invoke only the rules affected by those properties. |
Currently
BusinessRules
has two async check methodsI'd like to request/propose 3 new and an idea:
New overloads
The first one for using the right type for the right job. For an int you always have to look up in which unit it's wanted.
The second and third to get the same options as for the sync ones.
Idea
What about supporting cancellation tokens for the async execution? I see the problem that that would give the impression that the rule execution can be cancelled. Maybe that's a nice new feature after #3736 ?
The text was updated successfully, but these errors were encountered: