예제 #1
0
		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);
			}
		}
예제 #2
0
				public StorageSeriesInfo(CandleSeries series)
				{
					_storage = ConfigManager.GetService<IStorageRegistry>().GetCandleStorage(series, new LocalMarketDataDrive(UserConfig.Instance.CandleSeriesDumpPath));
				}
예제 #3
0
 private void AddAction(ActionType type, IMarketDataStorage storage)
 {
     _enumerators.Cache.ForEach(e => e.AddAction(type, storage));
 }
예제 #4
0
 private void InnerStoragesOnRemoved(IMarketDataStorage storage)
 {
     AddAction(ActionType.Remove, storage);
 }
예제 #5
0
 private void InnerStoragesOnAdded(IMarketDataStorage storage)
 {
     AddAction(ActionType.Add, storage);
 }
예제 #6
0
 public void AddAction(ActionType type, IMarketDataStorage storage)
 {
     _actions.Add(Tuple.Create(type, storage));
 }
예제 #7
0
 public StorageSeriesInfo(CandleSeries series)
 {
     _storage = ConfigManager.GetService <IStorageRegistry>().GetCandleStorage(series, new LocalMarketDataDrive(UserConfig.Instance.CandleSeriesDumpPath));
 }