RuleAttribute - NMehralizadeh/RuleEngineCore GitHub Wiki
This attribute can only set on the class. You can have more than one rule. You must set on the class as an attribute that is your rule. This attribute has three property but none of them is not required
- Name : string
- Description : string
- NextRule : type of your class that have rule attribute also
Name and description are helpful for another developer that working on the same project to find understand what it is. Sometimes you need to run another rule instantly current rule you can set next rule in NextRule
Property that raises after evaluate current rule condition and run actions for current rule also.
Example
[Rule(NextRule = typeof(AccountRule))]
public class IdentificationRule
{
// Class Body
}
[Rule]
public class AccountRule
{
// Class Body
}