| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System;
- using System.Collections.Generic;
- namespace Muchinfo.MTPClient.Infrastructure.Cache
- {
- /// <summary>
- /// 缓存回应数据类
- /// </summary>
- public class CacheResponseData
- {
- #region Fields
- /// <summary>
- /// 缓存时间
- /// </summary>
- private readonly DateTime _cacheTime;
- //考虑不要使用嵌套泛型的设计
- private readonly List<Dictionary<string, string>> _dataCollection;
- #endregion Fields
- #region Constructors
- /// <summary>
- /// Initializes a new instance of the <see cref="CacheResponseData"/> class.
- /// </summary>
- /// <param name="cacheTime">缓存时间</param>
- public CacheResponseData(DateTime cacheTime)
- {
- this._dataCollection = new List<Dictionary<string, string>>();
- this._cacheTime = cacheTime;
- }
- #endregion Constructors
- #region Properties
- #region Public Properties
- /// <summary>
- /// 获取缓存时间
- /// </summary>
- public DateTime CacheTime
- {
- get { return this._cacheTime; }
- }
- /// <summary>
- /// 获取缓存的字段值
- /// </summary>
- public List<Dictionary<string, string>> DataCollection
- {
- get { return this._dataCollection; }
- }
- #endregion Public Properties
- #endregion Properties
- }
- }
|