// Token: 0x06000318 RID: 792 RVA: 0x000139C8 File Offset: 0x00011BC8 private static bool ShowUpdateProductNotification(string productTag) { ModuleInfo moduleInfo = ModulesCollector.GetModuleInfo(productTag); if (string.IsNullOrEmpty(moduleInfo.ValidateUpdateNotification)) { return(true); } bool result; try { using (IInformationServiceProxy2 informationServiceProxy = SwisConnectionProxyPool.GetSystemCreator().Create()) { CoreHelper._log.DebugFormat("Calling SWQL query: {0}", moduleInfo.ValidateUpdateNotification); DataTable dataTable = informationServiceProxy.Query(moduleInfo.ValidateUpdateNotification); if (dataTable.Columns.Count != 1 && dataTable.Rows.Count != 1) { CoreHelper._log.WarnFormat("Invalid query: {0}", moduleInfo.ValidateUpdateNotification); result = true; } else { result = (dataTable.Rows[0][0] == null || Convert.ToBoolean(dataTable.Rows[0][0])); } } } catch (Exception ex) { CoreHelper._log.ErrorFormat("Execution of ValidateUpdateNotification '{0}' has failed. Exception: {1}", moduleInfo.ValidateUpdateNotification, ex); result = true; } return(result); }
// Token: 0x06000371 RID: 881 RVA: 0x00015878 File Offset: 0x00013A78 private static void DeleteOldSubscriptions() { using (IInformationServiceProxy2 informationServiceProxy = SwisConnectionProxyPool.GetSystemCreator().Create()) { string text = "SELECT Uri FROM System.Subscription WHERE description = @description"; foreach (DataRow dataRow in informationServiceProxy.Query(text, new Dictionary <string, object> { { "description", "OrionCoreIndications" } }).Rows.Cast <DataRow>()) { informationServiceProxy.Delete(dataRow[0].ToString()); } } }
private static void DeleteOldSubscriptions() { using (IInformationServiceProxy2 iinformationServiceProxy2_1 = ((IInformationServiceProxyCreator)SwisConnectionProxyPool.GetSystemCreator()).Create()) { string str1 = "SELECT Uri FROM System.Subscription WHERE description = @description"; IInformationServiceProxy2 iinformationServiceProxy2_2 = iinformationServiceProxy2_1; string str2 = str1; foreach (DataRow dataRow in ((IInformationServiceProxy)iinformationServiceProxy2_2).Query(str2, (IDictionary <string, object>) new Dictionary <string, object>() { { "description", (object)"AuditingIndications" } }).Rows.Cast <DataRow>()) { ((IInformationServiceProxy)iinformationServiceProxy2_1).Delete(dataRow[0].ToString()); } } }
private static bool ShowUpdateProductNotification(string productTag) { ModuleInfo moduleInfo = ModulesCollector.GetModuleInfo(productTag); if (string.IsNullOrEmpty(moduleInfo.get_ValidateUpdateNotification())) { return(true); } try { using (IInformationServiceProxy2 iinformationServiceProxy2 = ((IInformationServiceProxyCreator)SwisConnectionProxyPool.GetSystemCreator()).Create()) { CoreHelper._log.DebugFormat("Calling SWQL query: {0}", (object)moduleInfo.get_ValidateUpdateNotification()); DataTable dataTable = ((IInformationServiceProxy)iinformationServiceProxy2).Query(moduleInfo.get_ValidateUpdateNotification()); if (dataTable.Columns.Count == 1 || dataTable.Rows.Count == 1) { return(dataTable.Rows[0][0] == null || Convert.ToBoolean(dataTable.Rows[0][0])); } CoreHelper._log.WarnFormat("Invalid query: {0}", (object)moduleInfo.get_ValidateUpdateNotification()); return(true); } } catch (Exception ex) { CoreHelper._log.ErrorFormat("Execution of ValidateUpdateNotification '{0}' has failed. Exception: {1}", (object)moduleInfo.get_ValidateUpdateNotification(), (object)ex); return(true); } }
// Token: 0x060005FF RID: 1535 RVA: 0x00023CA4 File Offset: 0x00021EA4 public DowntimeMonitoringNotificationSubscriber(INetObjectDowntimeDAL netObjectDowntimeDal) : this(netObjectDowntimeDal, SwisConnectionProxyPool.GetSystemCreator(), new SwisUriParser()) { }
public DowntimeMonitoringNotificationSubscriber(INetObjectDowntimeDAL netObjectDowntimeDal) : this(netObjectDowntimeDal, (IInformationServiceProxyCreator)SwisConnectionProxyPool.GetSystemCreator(), (ISwisUriParser) new SwisUriParser(), SubscriptionManager.get_Instance()) { }