internal InstrumentResetItem GetResetItem(DateTime tradeDay) { InstrumentResetItem result; if (!_resetItemHistoryDict.TryGetValue(tradeDay, out result)) { var histories = ResetManager.Default.GetAccountInstrumentResetHistory(_owner.Id, this.Id, tradeDay); if (histories == null || histories.Count() == 0) { return(null); } result = new InstrumentResetItem(histories.Single()); _resetItemHistoryDict.AddItem(result, OperationType.AsNewRecord); } return(_resetItemHistoryDict[tradeDay]); }
internal void Add(AccountClass.Instrument instrument) { if (!_instruments.ContainsKey(instrument.Id)) { _instruments.AddItem(instrument, OperationType.AsNewRecord); } }
internal void AddTran(FakeTransaction tran, OperationType type) { _trans.AddItem(tran, type); }
internal void AddOrderRelation(OrderRelation item, OperationType operationType) { _orderRelations.AddItem(item, operationType); }
internal void AddDeliveryRequestOrderRelation(DeliveryRequestOrderRelation item, OperationType operationType) { _deliveryRequestOrderRelations.AddItem(item, operationType); }