// Token: 0x0600035D RID: 861 RVA: 0x00014E54 File Offset: 0x00013054 public static MaintenanceRenewalItemDAL GetNotificationItem(VersionInfo versionInfo) { MaintenanceRenewalItemDAL maintenanceRenewalItemDAL = new MaintenanceRenewalItemDAL(); MaintUpdateNotifySvcWrapper.UpdateNotificationItem(maintenanceRenewalItemDAL, versionInfo); return(maintenanceRenewalItemDAL); }
public static CustomerEnvironmentInfoPack GetEnvironmentInfoPack() { CustomerEnvironmentInfoPack environmentInfoPack = new CustomerEnvironmentInfoPack(); environmentInfoPack.OSVersion = Environment.OSVersion.VersionString; MaintenanceRenewalsCheckStatusDAL checkStatus = MaintenanceRenewalsCheckStatusDAL.GetCheckStatus(); DateTime minValue; if (checkStatus != null) { DateTime?lastUpdateCheck = checkStatus.LastUpdateCheck; if (lastUpdateCheck.HasValue) { lastUpdateCheck = checkStatus.LastUpdateCheck; minValue = lastUpdateCheck.Value; goto label_4; } } minValue = DateTime.MinValue; label_4: environmentInfoPack.LastUpdateCheck = minValue; environmentInfoPack.OrionDBVersion = DatabaseInfoDAL.GetOrionDBVersion(); environmentInfoPack.SQLVersion = DatabaseInfoDAL.GetSQLEngineVersion(); environmentInfoPack.Modules = MaintUpdateNotifySvcWrapper.GetModules(ModulesCollector.GetInstalledModules()); environmentInfoPack.CustomerUniqueId = ModulesCollector.GetCustomerUniqueId(); return(environmentInfoPack); }
private static void ProcessUpdateResponse(UpdateResponse response) { if (response == null) { throw new ArgumentNullException(nameof(response)); } if (response.Success) { if (response.Manifest != null && response.Manifest.CurrentVersions != null && response.Manifest.CurrentVersions.Length != 0) { CoreHelper._log.Debug((object)string.Format("ProcessUpdateResponse: Following response has been received from SolarWind's Server: {0}", (object)Serializer.ToXmlString((object)response.Manifest.CurrentVersions))); foreach (VersionInfo currentVersion in response.Manifest.CurrentVersions) { switch (currentVersion.ModuleStatus) { case ModuleStatusType.Updated: if (CoreHelper.ShowUpdateProductNotification(currentVersion.ProductTag)) { MaintenanceRenewalItemDAL itemForProduct = MaintenanceRenewalItemDAL.GetItemForProduct(currentVersion.ProductTag); if (itemForProduct == null) { CoreHelper._log.DebugFormat("Inserting new MaintenanceRenewalItem for product {0}.", (object)currentVersion.ProductTag); MaintenanceRenewalItemDAL notificationItem = MaintUpdateNotifySvcWrapper.GetNotificationItem(currentVersion); MaintenanceRenewalItemDAL.Insert(Guid.NewGuid(), notificationItem.Title, notificationItem.Description, notificationItem.Ignored, notificationItem.Url, notificationItem.AcknowledgedAt, notificationItem.AcknowledgedBy, notificationItem.ProductTag, notificationItem.DateReleased, notificationItem.NewVersion); break; } CoreHelper._log.DebugFormat("Updating existing MaintenanceRenewalItem for product {0}.", (object)currentVersion.ProductTag); MaintUpdateNotifySvcWrapper.UpdateNotificationItem(itemForProduct, currentVersion); itemForProduct.Update(); break; } break; case ModuleStatusType.Current: MaintenanceRenewalItemDAL itemForProduct1 = MaintenanceRenewalItemDAL.GetItemForProduct(currentVersion.ProductTag); if (itemForProduct1 != null) { itemForProduct1.Ignored = true; itemForProduct1.Update(); break; } break; } } } else { CoreHelper._log.Info((object)"No valid modules were submitted, nor found."); } } else { CoreHelper._log.Error((object)"Process update response failed."); } }
// Token: 0x06000317 RID: 791 RVA: 0x00013824 File Offset: 0x00011A24 private static void ProcessUpdateResponse(UpdateResponse response) { if (response == null) { throw new ArgumentNullException("response"); } if (!response.Success) { CoreHelper._log.Error("Process update response failed."); return; } if (response.Manifest != null && response.Manifest.CurrentVersions != null && response.Manifest.CurrentVersions.Length != 0) { CoreHelper._log.Debug(string.Format("ProcessUpdateResponse: Following response has been received from SolarWind's Server: {0}", Serializer.ToXmlString(response.Manifest.CurrentVersions))); foreach (VersionInfo versionInfo in response.Manifest.CurrentVersions) { ModuleStatusType moduleStatus = versionInfo.ModuleStatus; if (moduleStatus != ModuleStatusType.Updated) { if (moduleStatus == ModuleStatusType.Current) { MaintenanceRenewalItemDAL itemForProduct = MaintenanceRenewalItemDAL.GetItemForProduct(versionInfo.ProductTag); if (itemForProduct != null) { itemForProduct.Ignored = true; itemForProduct.Update(); } } } else if (CoreHelper.ShowUpdateProductNotification(versionInfo.ProductTag)) { MaintenanceRenewalItemDAL maintenanceRenewalItemDAL = MaintenanceRenewalItemDAL.GetItemForProduct(versionInfo.ProductTag); if (maintenanceRenewalItemDAL == null) { CoreHelper._log.DebugFormat("Inserting new MaintenanceRenewalItem for product {0}.", versionInfo.ProductTag); maintenanceRenewalItemDAL = MaintUpdateNotifySvcWrapper.GetNotificationItem(versionInfo); MaintenanceRenewalItemDAL.Insert(Guid.NewGuid(), maintenanceRenewalItemDAL.Title, maintenanceRenewalItemDAL.Description, maintenanceRenewalItemDAL.Ignored, maintenanceRenewalItemDAL.Url, maintenanceRenewalItemDAL.AcknowledgedAt, maintenanceRenewalItemDAL.AcknowledgedBy, maintenanceRenewalItemDAL.ProductTag, maintenanceRenewalItemDAL.DateReleased, maintenanceRenewalItemDAL.NewVersion); } else { CoreHelper._log.DebugFormat("Updating existing MaintenanceRenewalItem for product {0}.", versionInfo.ProductTag); MaintUpdateNotifySvcWrapper.UpdateNotificationItem(maintenanceRenewalItemDAL, versionInfo); maintenanceRenewalItemDAL.Update(); } } } return; } CoreHelper._log.Info("No valid modules were submitted, nor found."); }
// Token: 0x06000320 RID: 800 RVA: 0x00013D4C File Offset: 0x00011F4C public static CustomerEnvironmentInfoPack GetEnvironmentInfoPack() { CustomerEnvironmentInfoPack customerEnvironmentInfoPack = new CustomerEnvironmentInfoPack(); OperatingSystem osversion = Environment.OSVersion; customerEnvironmentInfoPack.OSVersion = osversion.VersionString; MaintenanceRenewalsCheckStatusDAL checkStatus = MaintenanceRenewalsCheckStatusDAL.GetCheckStatus(); customerEnvironmentInfoPack.LastUpdateCheck = ((checkStatus != null && checkStatus.LastUpdateCheck != null) ? checkStatus.LastUpdateCheck.Value : DateTime.MinValue); customerEnvironmentInfoPack.OrionDBVersion = DatabaseInfoDAL.GetOrionDBVersion(); customerEnvironmentInfoPack.SQLVersion = DatabaseInfoDAL.GetSQLEngineVersion(); customerEnvironmentInfoPack.Modules = MaintUpdateNotifySvcWrapper.GetModules(ModulesCollector.GetInstalledModules()); customerEnvironmentInfoPack.CustomerUniqueId = ModulesCollector.GetCustomerUniqueId(); return(customerEnvironmentInfoPack); }