static void StopAllRules(StopAllRulesOptions options) { foreach (var item in BGWorker.Rules) { BGWorker.StopRule(item.RuleID); } Console.WriteLine("All rules stopped!"); }
static void RemoveAllRules(RemoveAllRulesOptions options) { foreach (var item in BGWorker.Rules) { BGWorker.StopRule(item.RuleID); } BGWorker.Rules.Clear(); Console.WriteLine("Rules removed"); }
static void RemoveRule(RemoveRuleOptions options) { BGWorker.StopRule(int.Parse(options.RemoveRuleID)); BGWorker.RemoveRule(int.Parse(options.RemoveRuleID)); }
static void StopRule(StopRuleOptions options) { BGWorker.StopRule(int.Parse(options.StopRuleID)); }