using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace HardWareInteface.Common
{
///
/// 图片缓存模型
///
public class FaceRecCacheModel
{
///
/// 最后一次更新时间
///
public DateTime updtm { get; set; }
private string picurl;
///
/// 图片地址
///
public string PicUrl
{
get
{
return picurl;
}
set
{
picurl = value;
updtm = DateTime.Now;
}
}
///
/// 现在时间和历史存储时间比较
/// true 需要保存图片,更新键值对 false 不需要
///
public bool ChangeTime
{
get
{
if (updtm == null) // 时间为空
{
return true;
}
else
{
//现在时间和历史存储时间比较是否大于一分钟
TimeSpan ts = DateTime.Now - updtm;
if (ts.TotalMinutes > 1)
{
return true;
}
else
{
return false;
}
}
}
}
}
///
///
///
public static class FaceRecCache
{
public static Dictionary dic = new Dictionary();
}
}