protected override void OnShutdown() { Log.TryLogOnException(() => { Log.Me.Info("Shuting down server"); bridge?.Stop(); }); base.OnShutdown(); }
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); }