public static void RunConsole(string[] args) { IPBanService svc = new IPBanService(); svc.OnStart(args); Console.WriteLine("Press ENTER to quit"); Console.ReadLine(); svc.OnStop(); }
public static void RunConsole(string[] args) { IPBanService svc = new IPBanService(); svc.OnStart(args); Console.WriteLine("Press ENTER to quit"); string line; while ((line = Console.ReadLine()).Length != 0) { if (line.Equals("t", StringComparison.OrdinalIgnoreCase)) { svc.ReadAppSettings(); svc.RunTests(); } } svc.OnStop(); }