This is my take on Steve Smith (@ardalis)'s discount calculator that combines the rules design pattern with a bit of reflection and ordering to automatically detect and sort new rules to avoid having to modify existing classes when new discounts are introduced.
Want to contribute? Great, Discount Calculator Demo Using Rules Design Pattern is open-source!
Please feel free to clone this repository, fork it, make changes to the code, submit pull requests, raise issues, and/or email me using the address below for any suggestions, questions or remarks you may have.
Author's email address: clementcampagna+github@gmail.com
Author's website: https://clementcampagna.com