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); }
// 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); }
public static void CheckMaintenanceRenewals(bool forceCheck) { UpdateRequest request = new UpdateRequest(); request.ContractVersion = "1"; request.CustomerInfo = CustomerEnvironmentManager.GetEnvironmentInfoPack(); MaintUpdateNotifySvcClient updateNotifySvcClient = new MaintUpdateNotifySvcClient("WSHttpBinding_IMaintUpdateNotifySvc"); ((IHttpProxySettings)HttpProxySettings.Instance).SetBinding(new WSHttpBinding("WSHttpBinding_IMaintUpdateNotifySvc")); try { CoreHelper._log.Debug((object)string.Format("CheckMaintenanceRenewals: Send following Customer Info to SolarWind's Server: {0}", (object)Serializer.ToXmlString((object)request.CustomerInfo))); string primaryLanguage = new I18NHelper().get_PrimaryLanguage(); CoreHelper.ProcessUpdateResponse(updateNotifySvcClient.GetLocalizedData(request, primaryLanguage)); } catch (Exception ex) { CoreHelper._log.Error((object)("CheckMaintenanceRenewals: Error connecting to MaintUpdateNotifySvcClient - " + ex.Message)); } updateNotifySvcClient.Close(); MaintenanceRenewalsCheckStatusDAL.SetLastUpdateCheck(Settings.CheckMaintenanceRenewalsTimer.TotalMinutes, forceCheck); }