public static IComposedApplication GetInstance() { if (shadowCopiedApp == null) { //shadowCopiedApp = new ShadowCopiedComposedApp(); shadowCopiedApp = new UpdatableComposedApp(); } return(shadowCopiedApp); }
public UpdatableComposedApp() { try { UpdateDownloadHelper.DownloadUpdate(); } catch (Exception e) { GetExport <IExportLogger>()?.Error(e, "Could not download an {operation}", "update"); throw; } app = new ComposedApplication(); }
protected override void OnStartup(StartupEventArgs e) { //e.Args is the string[] of command line argruments composedApp = ApplicationCompositionHelper.GetInstance(); InitializeComposedApplication(composedApp); if (e.Args.Length != 0) { CarrotConfiguration config = CarrotConfiguration. GetFromCommandLine(new CarrotCommandLine(e.Args)); config.Save(); Shutdown(); } }
private void InitializeComposedApplication(IComposedApplication app) { app.Interaction.Setup(app.Exports); }