Beispiel #1
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Running Transcoder");
            if (args.Length == 0)
            {

                Console.WriteLine("Missing argument");
                Console.ReadLine();
                return;
            }
            try
            {
            #if DEBUG
                var service = new TranscoderService();
                service.OnStart(args);
            #else
                ServiceBase.Run(new TranscoderService());
            #endif

            }
            catch (Exception ex)
            {
                log.Fatal("Failed to start process", ex);
                Console.WriteLine(ex.Message);
                Console.WriteLine(ex.StackTrace);
                if (ex.InnerException != null)
                {
                    Console.WriteLine(ex.InnerException.Message);
                    Console.WriteLine(ex.InnerException.StackTrace);
                }
                //throw ex;
            }

               // System.Diagnostics.Process.GetCurrentProcess().Exited += new EventHandler(TP.TranscodeProcessor_Exited);
            #if DEBUG
            Console.ReadLine();
            #endif
        }
Beispiel #2
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Running Transcoder");
            if (args.Length == 0)
            {
                Console.WriteLine("Missing argument");
                Console.ReadLine();
                return;
            }
            try
            {
#if DEBUG
                var service = new TranscoderService();
                service.OnStart(args);
#else
                ServiceBase.Run(new TranscoderService());
#endif
            }
            catch (Exception ex)
            {
                log.Fatal("Failed to start process", ex);
                Console.WriteLine(ex.Message);
                Console.WriteLine(ex.StackTrace);
                if (ex.InnerException != null)
                {
                    Console.WriteLine(ex.InnerException.Message);
                    Console.WriteLine(ex.InnerException.StackTrace);
                }
                //throw ex;
            }

            // System.Diagnostics.Process.GetCurrentProcess().Exited += new EventHandler(TP.TranscodeProcessor_Exited);
#if DEBUG
            Console.ReadLine();
#endif
        }