예제 #1
0
 protected override void OnStop()
 {
     try
     {
         _controller.Stop();
     }
     finally
     {
         _controller.Dispose();
     }
 }
예제 #2
0
        static void Main(string[] args)
        {
            string        sourceFolder = ConfigurationManager.AppSettings["CSVSourceFolder"];
            CSVController controller   = new CSVController(sourceFolder);

            controller.Run();

            Console.WriteLine("\nTo stop watching and exit press '0'");
            while (Console.ReadKey(true).KeyChar != '0')
            {
                ;
            }
            controller.Stop();
            Console.WriteLine("\nPress any key to exit...");
            Console.ReadKey();
        }