Esempio n. 1
0
        public static int Main(string[] args)
        {
            CommandLineApplication commandLineApplication = new CommandLineApplication(false);

            commandLineApplication.Name = "MxTlsTester";

            commandLineApplication.HelpOption("-? | -h | --help");

            commandLineApplication.OnExecute(async() =>
            {
                AppDomain.CurrentDomain.ProcessExit        += CurrentDomainOnProcessExit;
                AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

                _cancellationTokenSource = new CancellationTokenSource();

                IMxSecurityTesterProcessor mxSecurityTesterProcessor =
                    MxSecurityTesterFactory.CreateMxSecurityTesterProcessor();

                await mxSecurityTesterProcessor.Process(_cancellationTokenSource.Token);

                return(0);
            });

            return(commandLineApplication.Execute(args));
        }
 public async Task Run()
 {
     await _scheduler.Start(() => _mxSecurityTesterProcessor.Process(),
                            _mxSecurityTesterConfig.SchedulerRunIntervalSeconds * 1000);
 }