Exemplo n.º 1
0
        // 按因子对象初始因子数据缓存集
        public bool InitDataCaches(IData_Factors infoFactors, IData_Factor infoFactor, bool useEvent = false)
        {
            if (_isInited == false)
            {
                return(false);
            }
            IDataCaches_Manage dataManage = this.GetDataCaches_Manage(infoFactors);

            if (dataManage == null)
            {
                return(false);
            }

            if (dataManage.GetDataCaches(infoFactor, false) == null)
            {
                DataCaches dataCaches = (DataCaches)dataManage.GetDataCaches(infoFactor, true);

                //注册检查集初始事件
                if (useEvent)
                {
                    dataCaches.DataChecks_Initial += new DataCachesChecksInitial_EventHandler(EventHandler_DataCachesChecksInitial);
                    dataCaches.Event_DataChecks_Initial();
                }
                return(this._IndexFactors(infoFactors, infoFactor));
            }
            return(true);
        }
Exemplo n.º 2
0
        /// <summary>提取指定因子对象集、因子对象的数据缓存集
        /// </summary>
        /// <param name="infoFactors">因子对象集</param>
        /// <param name="infoFactor">因子对象</param>
        /// <param name="autoInit">是否自动初始</param>
        /// <returns></returns>
        public IDataCaches GetDataCaches(IData_Factors infoFactors, IData_Factor infoFactor, bool autoInit = false)
        {
            //提取管理类
            IDataCaches_Manage dataManage = this.GetDataCaches_Manage(infoFactors, autoInit);

            if (dataManage == null)
            {
                return(null);
            }

            return(dataManage.GetDataCaches(infoFactor, autoInit));
        }
Exemplo n.º 3
0
        /// <summary>提取指定因子对象集、因子对象的数据缓存集
        /// </summary>
        /// <param name="infoFactors">因子对象集</param>
        /// <param name="infoFactor">因子对象</param>
        /// <param name="autoInit">是否自动初始</param>
        /// <returns></returns>
        public IDataCaches GetDataCaches(IData_Factors infoFactors, IData_Factor infoFactor, bool autoInit = false)
        {
            //提取管理类
            IDataCaches_Manage dataManage = this.GetDataCaches_Manage(infoFactors, autoInit);

            if (dataManage == null)
            {
                return(null);
            }

            IDataCaches dataCaches = dataManage.GetDataCaches(infoFactor, false);

            if (autoInit && dataCaches == null)
            {
                if (this.InitDataCaches(infoFactors, infoFactor, autoInit))
                {
                    return(GetDataCaches(infoFactors, infoFactor));
                }
            }
            return(dataCaches);
        }