public SourceInfo(ICandleSource <Candle> source, CandleManager manager) { _source = source ?? throw new ArgumentNullException(nameof(source)); _manager = manager; _source.Processing += OnProcessing; }
public CandleManagerSourceList(CandleManager manager) { if (manager == null) { throw new ArgumentNullException(nameof(manager)); } _manager = manager; }
/// <summary> /// Освободить занятые ресурсы. /// </summary> protected override void DisposeManaged() { base.DisposeManaged(); if (CandleManager != null) { CandleManager.Stop(this); } }
public SourceInfo(ICandleSource <Candle> source, CandleManager manager) { if (source == null) { throw new ArgumentNullException(nameof(source)); } _source = source; _manager = manager; _source.Processing += OnProcessing; _source.Error += _manager.RaiseError; }
public CandleEnumerator(CandleSeries series, IEnumerable <TValue> values) { _series = series; _valuesEnumerator = values.GetEnumerator(); _candleManager = new CandleManager(); _candleManager.Processing += OnProcessCandle; _builderSource = new EnumeratorCandleBuilderSource(series.Security); _candleManager.Sources.OfType <ICandleBuilder>().ForEach(b => b.Sources.Add(_builderSource)); _candleManager.Start(series); }
public SourceInfo(ICandleManagerSource source, CandleManager manager) { if (source == null) { throw new ArgumentNullException("source"); } _source = source; _manager = manager; _source.Processing += OnProcessing; _source.ProcessDataError += _manager.RaiseProcessDataError; _source.CandleManager = _manager; }
public CandleEnumerator(CandleSeries series, IEnumerable <TValue> values) { if (series == null) { throw new ArgumentNullException(nameof(series)); } if (values == null) { throw new ArgumentNullException(nameof(values)); } _series = series; _valuesEnumerator = values.GetEnumerator(); _candleManager = new CandleManager(); _candleManager.Processing += OnProcessCandle; _builderSource = new EnumeratorCandleBuilderSource(series.Security); _candleManager.Sources.OfType <ICandleBuilder>().ForEach(b => b.Sources.Add(_builderSource)); _candleManager.Start(series); }
public CandleManagerSourceList(CandleManager manager) { _manager = manager ?? throw new ArgumentNullException(nameof(manager)); }