Beispiel #1
0
        public static void Run(bool install, string pipes, string ports, string password, string terminalTemplate)
        {
            if (pipes != null)
            {
                ConsoleMirror.StartClient(pipes);
            }
            else
            {
                if (install)
                {
                    Installer.Install();
                }

                UI.Clear();

                MonoLogger.Setup();

                using (debugServer = new MonoDebugServer(false, ports, password, terminalTemplate)) {
                    debugServer.KeyPress += HandleKey;
                    debugServer.StartKeyInput();
                    debugServer.StartAnnouncing();
                    debugServer.Start();
                    debugServer.WaitForExit();
                }
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            ConsoleMirror.Initialize();

            try
            {
                var config = new Config();

                // construct a scheduler
                var schedulerFactory = new StdSchedulerFactory();
                var scheduler        = schedulerFactory.GetScheduler();
                scheduler.Start();

                var job = JobBuilder.Create <Jobs.NestLoggerJob>().Build();

                var trigger = TriggerBuilder.Create()
                              .WithSimpleSchedule(x => x.WithIntervalInMinutes(config.JobMinutes).RepeatForever())
                              .Build();

                scheduler.ScheduleJob(job, trigger);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.WriteLine(ex.StackTrace);
                logger.Error(ConsoleMirror.Captured);
            }
        }