//private List<CodeInfo> newcodes; public DataUpdateUtils2(string dataPath, ITradingDayReader tradingDayReader, IUpdatedDataInfo openDateReader_HistoryData, DataUpdateHelper dataLoader) { // this.dataLoader_InstrumentInfo = dataLoader_InstrumentInfo; this.codes = dataLoader.GetNewCodes(); //dataLoader_InstrumentInfo.GetAllInstruments(); this.openDates = tradingDayReader.GetAllTradingDays(); this.updateDateGetter = new NewDataInfoGetter(openDateReader_HistoryData, tradingDayReader, dataLoader, this.codes); }
public NewDataInfoGetter(IUpdatedDataInfo historyDataInfoLoader, ITradingDayReader tradingDayReader, DataUpdateHelper dataLoader) { //this.historyDataInfoLoader = new HistoryDataInfoLoader(srcDataPath); this.historyDataInfoLoader = historyDataInfoLoader; this.tradingDayReader = tradingDayReader; this.dataLoader = dataLoader; }
public NewDataInfoGetter(IUpdatedDataInfo historyDataInfoLoader, ITradingDayReader tradingDayReader, DataUpdateHelper dataLoader, List <CodeInfo> newcodes) : this(historyDataInfoLoader, tradingDayReader, dataLoader) { this.newcodes = newcodes; this.dic_Id_CodeInfo = new Dictionary <string, CodeInfo>(); for (int i = 0; i < newcodes.Count; i++) { string code = newcodes[i].ServerCode; if (this.dic_Id_CodeInfo.ContainsKey(code)) { this.dic_Id_CodeInfo.Remove(code); } this.dic_Id_CodeInfo.Add(code, newcodes[i]); } }
public WaitForUpdateDateGetter(IUpdatedDataInfo historyDataInfoLoader, List <int> openDates) { //this.historyDataInfoLoader = new HistoryDataInfoLoader(srcDataPath); this.historyDataInfoLoader = historyDataInfoLoader; this.openDates = openDates; }
public DataUpdateUtils(string dataPath, ITradingDayReader tradingDayReader, List <CodeInfo> codes, IUpdatedDataInfo openDateReader_HistoryData) { //List<CodeInfo> codes, List< int > openDates this.codes = codes; this.openDates = openDates; //IOpenDateReader_HistoryData openDateReader_HistoryData = new OpenDateReader_HistoryData_CsvData(srcDataPath); this.updateDateGetter = new WaitForUpdateDateGetter(openDateReader_HistoryData, openDates); }