Ejemplo n.º 1
0
        /// <summary>
        /// 拷贝
        /// 不更新唯一ID
        /// </summary>
        /// <param name="des"></param>
        public override void Copy(ICacheItem des)
        {
            base.Copy(des);
            LogInfoRow model = des as LogInfoRow;

            //model._guid = this.Guid;
            model.Level     = this.Level;
            model.TimeStamp = this.TimeStamp;
            model.DataInfo  = this.DataInfo;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取唯一索引
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        private string GetUniqueIndex(ICacheItem item)
        {
            if (item == null)
            {
                throw new Exception(string.Format("缓存表【{0}】获取索引错误,缓存项为空", this.TableName));
            }
            LogInfoRow log = item as LogInfoRow;

            if (log == null)
            {
                throw new Exception(string.Format("缓存表【{0}】获取索引错误,缓存项目信息转换错误", this.TableName));
            }
            return(log.Guid);
        }