예제 #1
0
        /// <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);
            }
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
        /// <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);
            }
        }