// Token: 0x060003A1 RID: 929 RVA: 0x00017E78 File Offset: 0x00016078
        internal static void CheckPollerLimit()
        {
            Dictionary <string, int> dictionary  = new Dictionary <string, int>();
            Dictionary <string, int> dictionary2 = new Dictionary <string, int>();

            try
            {
                DataTable engineProperty = EngineDAL.GetEngineProperty("Scale Factor");
                if (engineProperty != null)
                {
                    foreach (object obj in engineProperty.Rows)
                    {
                        DataRow dataRow = (DataRow)obj;
                        int     num;
                        if (int.TryParse(dataRow["PropertyValue"] as string, out num))
                        {
                            if (num >= Settings.PollerLimitreachedScaleFactor)
                            {
                                string key = dataRow["ServerName"] as string;
                                dictionary2[key] = num;
                            }
                            else if (num >= Settings.PollerLimitWarningScaleFactor)
                            {
                                string key2 = dataRow["ServerName"] as string;
                                dictionary[key2] = num;
                            }
                        }
                    }
                }
                if (dictionary.Count > 0 || dictionary2.Count > 0)
                {
                    PollerLimitNotificationItemDAL.Show(dictionary, dictionary2);
                }
                else
                {
                    PollerLimitNotificationItemDAL.Hide();
                }
            }
            catch (Exception ex)
            {
                PollerLimitHelper.log.Warn("Exception while checking poller limit value: ", ex);
            }
        }
Exemple #2
0
        internal static void CheckPollerLimit()
        {
            Dictionary <string, int> warningEngines = new Dictionary <string, int>();
            Dictionary <string, int> reachedEngines = new Dictionary <string, int>();

            try
            {
                DataTable engineProperty = EngineDAL.GetEngineProperty("Scale Factor");
                if (engineProperty != null)
                {
                    foreach (DataRow row in (InternalDataCollectionBase)engineProperty.Rows)
                    {
                        int result;
                        if (int.TryParse(row["PropertyValue"] as string, out result))
                        {
                            if (result >= Settings.PollerLimitreachedScaleFactor)
                            {
                                string index = row["ServerName"] as string;
                                reachedEngines[index] = result;
                            }
                            else if (result >= Settings.PollerLimitWarningScaleFactor)
                            {
                                string index = row["ServerName"] as string;
                                warningEngines[index] = result;
                            }
                        }
                    }
                }
                if (warningEngines.Count > 0 || reachedEngines.Count > 0)
                {
                    PollerLimitNotificationItemDAL.Show(warningEngines, reachedEngines);
                }
                else
                {
                    PollerLimitNotificationItemDAL.Hide();
                }
            }
            catch (Exception ex)
            {
                PollerLimitHelper.log.Warn((object)"Exception while checking poller limit value: ", ex);
            }
        }