internal HealthAlerts LoadConfiguration() { try { ConfigurationBuilder builder = new ConfigurationBuilder(filePath); builder.RegisterRootConfigurationObject(typeof(Alachisoft.NCache.Config.Dom.HealthAlerts)); builder.ReadConfiguration(); HealthAlerts[] healthAlerts = new HealthAlerts[builder.Configuration.Length]; builder.Configuration.CopyTo(healthAlerts, 0); return(healthAlerts[0]); } catch (Exception ex) { return(new HealthAlerts()); } }
void InitializeHealthDictionary(HealthAlerts healthAlerts) { if (healthAlerts != null) { foreach (DictionaryEntry data in healthAlerts.Resources) { string collectorName = (string)data.Key; if ((collectorName.ToLower().Equals(ResourceName.MIORRORQUEUEACTIVE) || collectorName.ToLower().Equals(ResourceName.BRIDGQQUEUE)) && (cacheContext.CacheImpl != null && !cacheContext.IsClusteredImpl)) { continue; } AlertCollectorsBase collector = GetCollector(collectorName, (ResourceAtribute)data.Value); alertDictionary.Add(collector, new AlertsObserver(this, collector)); } } }