private async void _timer_Elapsed(object sender, ElapsedEventArgs e) { SystemLogger.Instance.LogInformation("Check for update"); _timer.Stop(); var update = await _api.CheckForUpdates(); if (update != null) { SystemLogger.Instance.LogInformation("Download update"); await _api.DownloadUpdate(update); SystemLogger.Instance.LogInformation("Install update"); } await Init(); }
private async void _timer_Elapsed(object sender, ElapsedEventArgs e) { SystemLogger.Instance.LogInformation("Check for update"); _timer.Stop(); var update = await _api.CheckForUpdates(); if (update != null) { SystemLogger.Instance.LogInformation("Download update"); var fileInfo = await _api.DownloadUpdate(update); var check = Common.Update.Update.CheckUpdateFile(SystemLogger.Instance, fileInfo.FullName, ServerInfo.Rid); if (!check) { _api.DeleteUpdate(); } SystemLogger.Instance.LogInformation("Install update"); await Update(); } await Init(); }
public async Task <ServerVersion> CheckForUpdate() { return(await api.CheckForUpdates()); }
public async Task <ServerVersion> CheckForUpdate() { var update = await api.CheckForUpdates(); return(update); }