Esempio n. 1
0
        protected override void OnShutdown()
        {
            Log.TryLogOnException(() =>
            {
                Log.Me.Info("Shuting down server");
                bridge?.Stop();
            });

            base.OnShutdown();
        }
Esempio n. 2
0
        private static int Main(string[] args)
        {
            options = Options.Get(args);

            if (!options.ParsedSuccessfully)
            {
                return(1);
            }

            var bridge = new MposBridge(options);

            var running = true;

            Console.CancelKeyPress += (sender, e) => running = false;

            bridge.Start(false);

            while (running)
            {
                Thread.Yield();
            }

            bridge.Stop();

            return(0);
        }