public static async void Update() { try { var updateString = await AppConstantsApi.GetAppConstantsString(); if (string.IsNullOrWhiteSpace(updateString)) { logger.Info("No AppConstants update available."); return; } JsonConvert.PopulateObject(updateString, Instance); } catch (Exception ex) { logger.Warn("AppConstants.Update failed: " + ex.ToString()); } }
public static async void Update() { try { var updateString = await AppConstantsApi.GetAppConstantsString(); if (string.IsNullOrWhiteSpace(updateString)) { logger.Info("No AppConstants update available."); return; } JsonConvert.PopulateObject(updateString, Instance); Instance.ConstantsUpdated?.Invoke(Instance, new EventArgs()); } catch (Exception ex) { logger.Warn("AppConstants.Update failed: " + ex.ToString()); AnalyticsHelper.Log("constantsFetchException", ex.Message, ex.ToString()); } }