/// <summary> /// Remove History Point /// </summary> /// <param name="pKey"></param> public void RemoveHistoryPoint(string pKey) { try { HistoryPointInfo item = this.HistoryPoints.FirstOrDefault(c => c.Key == pKey); if (item != null) { this.HistoryPoints.Remove(item); } } catch (System.Exception ex) { LogManager.LogException(ex); } }
/// <summary> /// Get History Point /// </summary> /// <param name="pKey"></param> public string GetHistoryPointURL(string pKey) { string historyPointURL = string.Empty; try { HistoryPointInfo item = this.HistoryPoints.FirstOrDefault(c => c.Key == pKey); if (item != null) { historyPointURL = item.HistoryURL; } } catch (System.Exception ex) { LogManager.LogException(ex); } return(historyPointURL); }
/// <summary> /// Add History Point /// </summary> /// <param name="pNewURL"></param> /// <param name="pHistoryURL"></param> public void AddHistoryPoint(string pKey, string pHistoryURL) { bool performAdd = true; try { HistoryPointInfo item = this.HistoryPoints.FirstOrDefault(c => c.Key == pKey); if (item != null && this.HistoryPoints.IndexOf(item) == 0) { performAdd = false; } if (performAdd) { this.HistoryPoints.Add(new HistoryPointInfo(pKey, pHistoryURL)); } } catch (System.Exception ex) { LogManager.LogException(ex); } }