//统一初始数据缓存相关 public virtual bool InitDataCache(Data_Quote pData) { if (pData == null) { return(false); } StockInfo stockInfo = pData.GetStockInfo(); if (stockInfo == null) { return(false); } string exType = stockInfo.StockExchange.ToString(); bool bExist = true, bResult = true; IData_Factors pFactors = _managerCaches._GetFactors(exType); if (pFactors == null) { //提取信息 pFactors = new Data_Factors(exType, exType, "", ""); pFactors.DateTime = pData.DateTime; bExist = false; } IData_Factor pFactor = pFactors.GetData_Factor(stockInfo.StockID_Tag); if (bExist == false || pFactor == null) { //提取信息 pFactor = new Data_Factor(stockInfo.StockID_Tag, stockInfo.StockID_Tag, stockInfo.StockName, ""); pFactor.DateTime = pFactors.DateTime; //初始数据所有缓存对象 if (this._managerCaches.DataCaches_Manages.Count < 1) { this._managerCaches.Init(pFactors.DateTime); } foreach (var item in _setsDataCache) { //提取数据缓存对象、及检查对象集 IDataCache <Data_Quote> poDataCache = _managerCaches.GetDataCache <Data_Quote>(pFactors, pFactor, "", item.Key, true, item.Value); //IDataCache poDataCache = null; //if (item.Key == typeTimeFrequency.real) // poDataCache = _managerCaches.GetDataCache<Data_Quote>(pFactors, pFactor, "", item.Key, true, item.Value); //else // poDataCache = _managerCaches.GetDataCache<Data_Quote>(pFactors, pFactor, "", item.Key, true, item.Value); //_managerCaches.InitDataCache<Data_Quote_Swap>(pFactors, pFactor, "", item.Key, item.Value); } //初始规则信息集合-Caches //bResult = this.InitDataChecks_Caches(pFactors, pFactor); //初始规则信息集合-Cache //bResult = bResult && this.InitDataChecks_Cache(pFactors, pFactor, data); _dictQuotes[_getTag(pData)] = true; return(bResult); } return(false); }