private void Add(IDictionary<DateTime, MarketDataEntry> dict, IMarketDataStorage storage, string[] candleKeys, Action<MarketDataEntry> action) { lock (_syncObject) { if (_isChanged) return; } foreach (var batch in storage.Dates.Batch(10)) { lock (_syncObject) { if (_isChanged) return; } TryAddEntries(dict, batch, candleKeys, action); } }
public StorageSeriesInfo(CandleSeries series) { _storage = ConfigManager.GetService<IStorageRegistry>().GetCandleStorage(series, new LocalMarketDataDrive(UserConfig.Instance.CandleSeriesDumpPath)); }
private void AddAction(ActionType type, IMarketDataStorage storage) { _enumerators.Cache.ForEach(e => e.AddAction(type, storage)); }
private void InnerStoragesOnRemoved(IMarketDataStorage storage) { AddAction(ActionType.Remove, storage); }
private void InnerStoragesOnAdded(IMarketDataStorage storage) { AddAction(ActionType.Add, storage); }
public void AddAction(ActionType type, IMarketDataStorage storage) { _actions.Add(Tuple.Create(type, storage)); }
public StorageSeriesInfo(CandleSeries series) { _storage = ConfigManager.GetService <IStorageRegistry>().GetCandleStorage(series, new LocalMarketDataDrive(UserConfig.Instance.CandleSeriesDumpPath)); }