Exemple #1
0
        private static void CheckForUpdates()
        {
            var updateManager = new WsapmUpdateManager();
            var updateStatus  = updateManager.CheckForUpdates();

            if (updateStatus.HasValue && updateStatus.Value)
            {
                WsapmLog.Log.WriteLine(string.Format(Resources.Wsapm_Core.WsapmManager_UpdateAvailable, updateManager.UpdateInformation.CurrentVersion), LogMode.Normal);
            }
        }
Exemple #2
0
        /// <summary>
        /// Gets current version information,
        /// </summary>
        /// <returns>The VersionUpdateInformation of the current WSAPM version. Null if retrieving of the information fails.</returns>
        private static WsapmVersionUpdateInformation GetCurrentVersionInformation()
        {
            var versionInfo = WsapmUpdateManager.GetCurrentVersionInformation(WsapmUpdateManager.VersionUriHttps);

            if (versionInfo == null)
            {
                // HTTPS failed -> try HTTP.
                versionInfo = WsapmUpdateManager.GetCurrentVersionInformation(WsapmUpdateManager.VersionUri);
            }

            return(versionInfo);
        }