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); }
protected override void OnStart(string[] args) { Log.Me.Info("Bifrost Service Bridge"); base.OnStart(args); Log.TryLogOnException(() => { bridge = new MposBridge(options); Log.Me.Info("Starting server"); bridge.Start(); }); }