You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by mtavares628 August 1, 2023
I've noticed this issue which ends up causing the same rules on my object to be run over and over. Basically if I pass properties (besides the PrimaryProperty) to the constructor of my rule (Rule A), and that passed in property is used as a PrimaryProperty in some other rule (Rule B), then Rule A gets called again whenever Rule B has been called. I would expect this to happen if I added the property to the AffectedProperties list for the rule, or added a Dependency rule between the 2 properties, but I'm not doing that.
Here is a sample that recreates the behavior. If you set a breakpoint on ExecuteAsync of the IDRule below, then it will get called twice when CheckRules is called.
Is this by design? And if so, then how can I create rules with multiple properties, and prevent the rule from being called multiple times if the secondary (non-PrimaryProperty) has it's own set of rules? I can't use the Target object either, since my rules need to be Async for Blazor.
The text was updated successfully, but these errors were encountered:
Discussed in #3415
Originally posted by mtavares628 August 1, 2023
I've noticed this issue which ends up causing the same rules on my object to be run over and over. Basically if I pass properties (besides the PrimaryProperty) to the constructor of my rule (Rule A), and that passed in property is used as a PrimaryProperty in some other rule (Rule B), then Rule A gets called again whenever Rule B has been called. I would expect this to happen if I added the property to the AffectedProperties list for the rule, or added a Dependency rule between the 2 properties, but I'm not doing that.
Here is a sample that recreates the behavior. If you set a breakpoint on ExecuteAsync of the IDRule below, then it will get called twice when CheckRules is called.
Is this by design? And if so, then how can I create rules with multiple properties, and prevent the rule from being called multiple times if the secondary (non-PrimaryProperty) has it's own set of rules? I can't use the Target object either, since my rules need to be Async for Blazor.
The text was updated successfully, but these errors were encountered: