private static void WriteAllStockData() { Utility.Log("Start write all stock data..."); ThreadController.InitParams(StockDic.Count, false); foreach (var it in StockDic) { //it.Value.WriteStockData(); ThreadController.StartProc(new ThreadData_Stock(it.Value, it.Value.WriteStockData)); } ThreadController.WaitQueueFinished(); Utility.Log("Finish write all stock data..."); }
//download public static int DownloadAllStockData() { Utility.Log("Start download stock data..."); NowDate = Utility.GetNowDate(); if (Config.bDownloadUpdate) { ThreadController.InitParams(StockDic.Count, true); foreach (KeyValuePair <int, Stock> it in StockDic) { //it.Value.DownloadStockData(); ThreadController.StartProc(new ThreadData_Stock(it.Value, it.Value.DownloadStockData)); } ThreadController.WaitQueueFinished(); WriteStockInfo(); } else { foreach (KeyValuePair <int, Stock> it in StockDic) { if (Config.bDebug) { if (it.Value.sid != Config.DebugSid) { continue; } //if (!BugList.Contains(it.Value.sid.ToString().PadLeft(6, '0'))) //{ // continue; //} } it.Value.DownloadStockData(); } } Utility.Log("Finish download stock data..."); return(0); }
private static void ReadAllStockData() { Utility.Log("Start load all stock data..."); if (Config.bFalse) { ThreadController.InitParams(StockDic.Count, false); foreach (var it in StockDic) { ThreadController.StartProc(new ThreadData_Stock(it.Value, it.Value.LoadStockData)); } ThreadController.WaitQueueFinished(); } else { foreach (var it in StockDic) { it.Value.LoadStockData(); } } Utility.Log("Finish load all stock data..."); }