Example #1
0
        static void Main(string[] args)
        {
            try
            {
                AppDomain currentAppDomain = AppDomain.CurrentDomain;
                currentAppDomain.UnhandledException += new UnhandledExceptionEventHandler(Handler);

                ProcessController procControl = new ProcessController(@"C:\liyan\IDE\NetProfiling\BAMP\SimpleDemo\BeyondAPM.Simple.Target\BeyondAPM.Simple.Target\bin\Debug\BeyondAPM.Simple.Target.exe");
                procControl.Start();
                char start = Console.ReadKey().KeyChar;
                if (start == (char)0)
                    procControl.Stop();
                
            }
            catch (Exception ex)
            {
                Console.Write(ex);
                Console.Write(ex.InnerException.StackTrace);
            }
            finally
            {
                Console.Read();
                //processProfiled.Close();
            }
        }
Example #2
0
        static void Main(string[] args)
        {
            try
            {
                AppDomain currentAppDomain = AppDomain.CurrentDomain;
                currentAppDomain.UnhandledException += new UnhandledExceptionEventHandler(Handler);

                ProcessController procControl = new ProcessController(@"C:\liyan\IDE\NetProfiling\BAMP\SimpleDemo\BeyondAPM.Simple.Target\BeyondAPM.Simple.Target\bin\Debug\BeyondAPM.Simple.Target.exe");
                procControl.Start();
                char start = Console.ReadKey().KeyChar;
                if (start == (char)0)
                {
                    procControl.Stop();
                }
            }
            catch (Exception ex)
            {
                Console.Write(ex);
                Console.Write(ex.InnerException.StackTrace);
            }
            finally
            {
                Console.Read();
                //processProfiled.Close();
            }
        }