Example #1
0
        public async Task <Info> CheckForUpdatesAsync()
        {
            var latestInfo = await GetLatestCardInfo().ConfigureAwait(false);

            var currentVersion = Settings.ActiveCardDataVersion != null ? Settings.ActiveCardDataVersion : Info.Current.CardDataVersion;

            if (latestInfo.CardDataVersion > currentVersion &&
                latestInfo.CardDataCompatibleVersion <= currentVersion)
            {//remote card data is newer and compatible
                DataUpdateAvailable?.Invoke(this, latestInfo);
            }

            return(latestInfo);
        }
Example #2
0
 /// <summary>
 /// Called when data update is available.
 /// </summary>
 /// <param name="changedFiles">The changed files.</param>
 internal static void OnDataUpdateAvailable(Collection <SerializableDatafile> changedFiles)
 {
     Trace($"(ChangedFiles = {changedFiles.Count})");
     DataUpdateAvailable?.ThreadSafeInvoke(null, new DataUpdateAvailableEventArgs(changedFiles));
 }