private void LoadTimeRange() { try { var file = GetTimeRangeDataFile(); if (File.Exists(file)) { var manager = new TradingTimeManager(); manager.Load(file); _manager = manager; } } catch (Exception e) { Logger.Warn($@"LoadTimeRange [{e}]"); } }
private void LoadTimeRange() { try { var file = GetTimeRangeDataFile(); if (File.Exists(file)) { var manager = new TradingTimeManager(); manager.Load(JsonConvert.DeserializeObject <string[][]>(QBHelper.ReadOnlyAllText(file))); TimeManager = manager; } } catch (Exception e) { Logger.Warn($@"LoadTimeRange [{e}]"); } }
private void LoadTimeRange() { try { var file = GetTimeRangeDataFile(); if (File.Exists(file)) { var manager = new TradingTimeManager(); manager.Load(file); _manager = manager; } } catch (Exception) { // ignored } }
private void LoadTimeRange(string file = null) { file = file ?? GetTimeRangeDataFile(); if (!File.Exists(file)) { return; } var content = QBHelper.ReadOnlyAllText(file); try { var manager = new TradingTimeManager(); manager.Load(JsonConvert.DeserializeObject <string[][]>(content)); TimeManager = manager; } catch (Exception e) { Logger.Warn($"LoadTimeRange [{e.Message}]"); } }