protected override void OnStartup(StartupEventArgs e)
{
Log.Info("App starts");
base.OnStartup(e);
Log.Info("Bootstrapper starts");
// Start Bootstrapper
var bootstrapper = new AuraBootstrapper();
bootstrapper.Run();
Application.Current.Exit += AppExitHandler;
// On start up publish opened image
if (e.Args.Length >= 1)
{
bootstrapper.Container.Resolve<IEventAggregator>().GetEvent<OpenedImageEvent>().Publish(e.Args[0]);
}
// Unhandled by code running on the main UI thread
Current.DispatcherUnhandledException += DispatcherUnhandledExceptionHandler;
// In any thread
AppDomain.CurrentDomain.UnhandledException += DomainUnhandledExceptionHandler;
}