// Token: 0x06000802 RID: 2050 RVA: 0x000398E8 File Offset: 0x00037AE8 public static void UpdateParticipationFromInstalledProducts(out bool needsreflow) { IEnumerable <PackageInfo> installedPackages = PackageManager.Instance.GetInstalledPackages(); List <ModuleInfo> installedModules = ModulesCollector.GetInstalledModules(); IEnumerable <string> values = from name in (from package in installedPackages select package.PackageId).Concat(from module in installedModules select module.ProductShortName) select '\'' + name.Replace("'", "''") + '\''; using (SqlCommand textCommand = SqlHelper.GetTextCommand(new StringBuilder("UPDATE dbo.[NodeChildStatusParticipation] set Installed=0 Where ModuleName not in (").Append(string.Join(",", values)).Append(')').ToString())) { int num = SqlHelper.ExecuteNonQuery(textCommand); needsreflow = (num > 0); } }
// 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 UpdateParticipationFromInstalledProducts(out bool needsreflow) { using (SqlCommand textCommand = SqlHelper.GetTextCommand(new StringBuilder("UPDATE dbo.[NodeChildStatusParticipation] set Installed=0 Where ModuleName not in (").Append(string.Join(",", ((IPackageManager)SolarWinds.Orion.Core.Common.PackageManager.PackageManager.Instance).GetInstalledPackages().Select <PackageInfo, string>((Func <PackageInfo, string>)(package => package.get_PackageId())).Concat <string>(((IEnumerable <ModuleInfo>)ModulesCollector.GetInstalledModules()).Select <ModuleInfo, string>((Func <ModuleInfo, string>)(module => module.get_ProductShortName()))).Select <string, string>((Func <string, string>)(name => '\''.ToString() + name.Replace("'", "''") + (object)'\'')))).Append(')').ToString())) { int num = SqlHelper.ExecuteNonQuery(textCommand); needsreflow = num > 0; } }
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); }