private static void Main() { var rulesEngine = new RulesEngine<TicketHolder>(); var ruleSet = rulesEngine.LoadRuleSetFromFile(); Console.WriteLine("Press space to modify rules, otherwise press any key to execute the rules..."); if (Console.ReadKey().Key == ConsoleKey.Spacebar) { ruleSet = rulesEngine.LaunchRulesDialog(ruleSet); } var ticketHolders = GetTicketHolders(); Console.WriteLine("Before the rules are applied"); DisplayTicketHolders(ticketHolders); ticketHolders.ForEach(ticketHolder => rulesEngine.ProcessRuleSet(ticketHolder, ruleSet)); Console.WriteLine("After the rules are applied"); DisplayTicketHolders(ticketHolders); Console.ReadKey(); }