コード例 #1
0
ファイル: HistoryManager.cs プロジェクト: kamhawy/AppsTalk
        /// <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
ファイル: HistoryManager.cs プロジェクト: kamhawy/AppsTalk
        /// <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
ファイル: HistoryManager.cs プロジェクト: kamhawy/AppsTalk
        /// <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);
            }
        }