public int InitDatas(Dictionary <DateTime, T> datas) { foreach (KeyValuePair <DateTime, T> data in datas) { DateTime dtTime_Check = _DataCache_Set.CheckTime(data.Key); _DataCaches[dtTime_Check] = data.Value; } return(datas.Count); }
public CacheInfo <T> InitDataCache(DateTime dtTime, T data, bool bAdd = true, bool bFixedData = false, bool bIniting = false) { DateTime dtTime_Check = _DataCache_Set.CheckTime(dtTime); CacheInfo <T> pCacheInfo = new CacheInfo <T>(dtTime, data); if (bFixedData) { pCacheInfo.SetData_Fixed(); } //执行添加 if (bAdd) { if (!this.SetData(pCacheInfo, bIniting)) { return(null); } } return(pCacheInfo); }