private void PreprocessCommandLine() { Log.Info("Enter PreprocessCommandLine()"); //check if it need finish updating. if (CommandLine.ContainSwitchOption("update")) { ProgramUpdater.ApplyUpdate(); } if (CommandLine.ContainSwitchOption("update_plugin")) { PluginUpdaterManager.ApplyPluginUpdate(); } if (CommandLine.ContainSwitchOption("database_backup")) { if (CommandLine.TryGetOptionValue("to", out string to)) { LocalDBContext.BackupDatabase(to); Environment.Exit(0); } } if (CommandLine.ContainSwitchOption("database_restore")) { if (CommandLine.TryGetOptionValue("to", out string to) && CommandLine.TryGetOptionValue("from", out string from)) { LocalDBContext.RestoreDatabase(from, to); Environment.Exit(0); } } }
private void PreprocessCommandLine() { Log.Info("Enter PreprocessCommandLine()"); //check if it need finish updating. if (CommandLine.ContainSwitchOption("update")) { ProgramUpdater.ApplyUpdate(); } if (CommandLine.ContainSwitchOption("update_plugin")) { PluginUpdaterManager.ApplyPluginUpdate(); } }
private async void BeginCheckUpdatable() { Log.Info("Enter BeginCheckUpdatable()"); await Task.Run(() => { if (SettingManager.LoadSetting <GlobalSetting>().EnableAutoCheckUpdatable) { ProgramUpdater.CheckUpdatable(); foreach (var updatable in Container.Default.GetExportedValues <PluginInfo>().OfType <IPluginUpdatable>()) { PluginUpdaterManager.CheckPluginUpdatable(updatable); } } }); }