public void ConsoleMode()
 {
     try
     {
         using (var service = new TraceEventServiceHost())
         {
             service.Start();
             Console.WriteLine();
             Console.WriteLine(Resources.StopServiceMessage);
             Console.ReadLine();
         }
     }
     catch (Exception e)
     {
         DisplayExceptionOnConsole(e);
     }
 }
 public void ConsoleMode()
 {
     try
     {
         using (TraceEventServiceHost service = new TraceEventServiceHost())
         {
             service.Start();
             Console.WriteLine();
             Console.WriteLine(Resources.StopServiceMessage);
             Console.ReadLine();
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e.ToString());
         Console.WriteLine();
         Console.WriteLine(Resources.StopServiceMessage);
         Console.ReadLine();
         this.ExitCode = ApplicationExitCode.RuntimeError;
     }
 }
Exemplo n.º 3
0
 public void ConsoleMode()
 {
     try
     {
         using (var service = new TraceEventServiceHost())
         {
             service.Start();
             Console.WriteLine();
             Console.WriteLine(Resources.StopServiceMessage);
             Console.ReadLine();
         }
     }
     catch (Exception e)
     {
         DisplayExceptionOnConsole(e);
     }
 }
Exemplo n.º 4
0
 public void ConsoleMode()
 {
     try
     {
         using (var service = new TraceEventServiceHost())
         {
             service.Start();
             Console.WriteLine();
             Console.WriteLine(Resources.StopServiceMessage);
             Console.ReadLine();
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e.ToString());
         Console.WriteLine();
         Console.WriteLine(Resources.StopServiceMessage);
         Console.ReadLine();
         this.ExitCode = ApplicationExitCode.RuntimeError;
     }
 }