Expression Rules, Version 2
Recently I have written a rules engine for a very large menu system in an application I work on. Many of the rules apply many items, so I didn’t wish to have to express the same rule many times. To avoid this, the rule engine DSL was born: Concerns.When(item => /* rule of some sort */) .AppliesToAll() .Except(MenuItems.ToggleHidden, MenuItems.Refresh) And rules are rolled together, so a specific menu item must have all of its rules evaluating to true to be displayed....