Ejemplo n.º 1
0
        public static void OnCommandLineException(object sender, CommandLineExceptionEventArgs e)
        {
            if (e == null)
            throw new ArgumentNullException("e");

              Console.ForegroundColor = ConsoleColor.Red;
              Console.WriteLine(e.Exception.Message);
              Console.ResetColor();

              ICommandLine commandLine = sender as ICommandLine;
              if (commandLine != null)
              {
            commandLine.Terminate();
              }

              Environment.Exit(0);
        }
Ejemplo n.º 2
0
        public static void OnCommandLineException(object sender, CommandLineExceptionEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine(e.Exception.Message);
            Console.ResetColor();

            ICommandLine commandLine = sender as ICommandLine;

            if (commandLine != null)
            {
                commandLine.Terminate();
            }

            Environment.Exit(0);
        }
Ejemplo n.º 3
0
        private void OnCommandLineException(object sender, CommandLineExceptionEventArgs e)
        {
            this.Dispatcher.Invoke(DispatcherPriority.Normal,
            new Action(() =>
            {
              lock (tailLocker)
              {
            tbFileData.AppendText(e.Exception.Message);
            tbFileData.ScrollToEnd();

            OnTailButtonClick(sender, new RoutedEventArgs());
              }
            }));
        }