-
Notifications
You must be signed in to change notification settings - Fork 8
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
Rename content type to ruleset #171
Conversation
bbfecac
to
e3bbb2e
Compare
e3bbb2e
to
4bbd83b
Compare
samples/Rules.Framework.InMemory.Sample/Engine/IRuleSpecificationsRegistrar.cs
Outdated
Show resolved
Hide resolved
samples/Rules.Framework.WebUI.Sample/Rules/RulesRandomFactory.cs
Outdated
Show resolved
Hide resolved
.WithDatesInterval(dateBegin, dateEnd) | ||
bool isActive = true) => Rule.Create<RulesetNames, ConditionNames>($"Multi rule for test {ruleset} {value}") | ||
.OnRuleset(ruleset) | ||
.SetContent(new { Value = value }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a race condition in this method if a thread changes the object that was created, on the next match the object changed will be given to the new thread. Perhaps we can allow the dev to have a function to be able to give the thread a new object whenever the rule matches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but I will address that on a separate PR 👍
Description
Renames content type to ruleset and condition type to condition:
TContentType
generic references renamed toTRuleset
.TConditionType
generic references renamed toTCondition
.Note
The concept of
Ruleset
is introduced to replace the content type concept. Functionally, it works the same way, but presents a simpler concept to new library users: a ruleset is a collection of related rules which are managed and evaluated together.Warning
BREAKING CHANGE: the rule builder API was refactored to align with the Rule Query Language specification (being developed on a separate branch).
Take as example the RQL sentence:
It would be written on rule builder API as:
Change checklist
Please also check the I want to contribute guidelines and make sure you have done accordingly.
Disclaimer
By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement