public void Dispose() { OhlcMaker.OnOhlcMaked -= OhlcMaker_OnOhlcMaked; if (ohlcSaver != null) { ohlcSaver.Dispose(); ohlcSaver = null; } }
public KlineSvc(IOptionModel Model) { this.Model = Model; ohlcGen = new OhlcGenarator(); ohlcSaver = new OhlcSaver(); kdp = new KlineDataPool((cid) => { return(Model.Contracts.Where(a => a.Id == cid && a.IsDel == false).FirstOrDefault()); }); }