public void ServerDictionary() { UptrendsApi api = new UptrendsApi(); try { List<Uptrends.Server> serverResponse = api.serverList(); foreach (Uptrends.Server sr in serverResponse) { if (!serverValuePairs.ContainsKey(sr.CheckPointID)) { serverValuePairs.TryAdd(sr.CheckPointID, sr.CheckPointName); } } } catch (Exception){ //log exception } }
public void ProbeDictionary() { UptrendsApi api = new UptrendsApi(); try { List<Uptrends.Probe.Probe> response = api.allProbes(); foreach (Uptrends.Probe.Probe pr in response) { if (!probeValuePairs.ContainsKey(pr.Guid)) { probeValuePairs.TryAdd(pr.Guid, pr.Name); } } } catch (Exception) { //log exception } }