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();
        }
Example #2
0
        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();
        }
Example #3
0
 public async Task <ServerVersion> CheckForUpdate()
 {
     return(await api.CheckForUpdates());
 }
Example #4
0
        public async Task <ServerVersion> CheckForUpdate()
        {
            var update = await api.CheckForUpdates();

            return(update);
        }