protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); ThreadedAlerter.CatchErrors(this); var cfg = CfgReader.ReadAndParseFromLocal(); if (cfg == null) { MessageBox.Show($"Config not found in {CfgReader.ExpectedPath}"); return; } var win = new MainWindow(); using (var scope = Components.GetContainer(cfg).BeginLifetimeScope()) { win.DataContext = scope.Resolve <MainWindowVM>(); } win.Show(); }
public static void CatchErrors(this IRepo1Client repo1Client, Application app, Action <string> errorLogger = null) => ThreadedAlerter.CatchErrors(app, PostIssueThen(repo1Client, errorLogger));