예제 #1
0
 public DataReaderFactory2(String dataPath)
 {
     this.dataPath  = dataPath;
     this.pathUtils = new DataPathUtils(dataPath);
     //this.codeReader = new InstrumentReader(PathUtils.GetCodePath());
     this.openDateReader  = new TradingDayReader(PathUtils.GetTradingDayPath());
     this.openTimeReader  = new TradingSessionReader_Code(dataPath);
     this.tickDataReader  = new HistoryDataReader_Tick(dataPath);
     this.klineDataReader = new KLineDataReader(dataPath);
     this.realDataReader  = new TimeLineDataReader(this);
     //this.dataNavigate = new DataNavigate3(this);
     //this.cacheFactory = new DataCacheFactory(this);
     //this.dataNavigateMgr = new DataNavigateMgr(this);
     this.openDateReaderMgr = new TradingSessionReader_CodeMgr(this);
 }
예제 #2
0
        public static bool CheckDataStore(string dataCenterUri)
        {
            Uri uri = new Uri(dataCenterUri);

            if (uri.IsFile)
            {
                string        path          = uri.LocalPath;
                DataPathUtils dataPathUtils = new DataPathUtils(path);
                string        codePath      = dataPathUtils.GetInstrumentPath();
                //如果连股票代码文件都不存在,可以认为该数据中心没建立
                if (!File.Exists(codePath))
                {
                    return(false);
                }
                return(true);
            }
            return(true);
        }
예제 #3
0
 public DataUpdate_Code(Plugin_DataProvider dataProvider)
 {
     this.dataProvider = dataProvider;
     this.utils        = new DataPathUtils(dataProvider.GetDataPath());
     this.codeStore    = new InstrumentStore_File(utils.GetCodePath());
 }
예제 #4
0
 public DataUpdate_Tick(Plugin_DataProvider dataProvider)
 {
     this.utils        = new DataPathUtils(dataProvider.GetDataPath());
     this.dataProvider = dataProvider;
 }
예제 #5
0
 public KLineDataGetter_FromTick(DataReaderFactory dataReaderFactory, Plugin_DataProvider dataProvider)
 {
     this.utils             = new DataPathUtils(dataProvider.GetDataPath());
     this.dataReaderFactory = dataReaderFactory;
     this.dataProvider      = dataProvider;
 }
예제 #6
0
 public DataUpdate_OpenDate(Plugin_DataProvider dataProvider)
 {
     this.pathUtils    = new DataPathUtils(dataProvider.GetDataPath());
     this.dataProvider = dataProvider;
 }