private void Parse(OrderRelationConstructParams constructParams) { _id = this.CreateKey("ID", constructParams.Id); _openOrderId = this.CreateKey(OrderRelationBusinessItemNames.OpenOrderId, constructParams.OpenOrder.Id); _closeOrderId = this.CreateKey(OrderRelationBusinessItemNames.CloseOrderId, _closeOrder.Id); _closedLot = this.CreateReadonlyItem(OrderRelationBusinessItemNames.ClosedLot, constructParams.ClosedLot); _closeTime = this.CreateSoundItem(OrderRelationBusinessItemNames.CloseTime, constructParams.CloseTime); _valueTime = this.CreateSoundItem(OrderRelationBusinessItemNames.ValueTime, constructParams.ValueTime); _decimals = this.CreateSoundItem(OrderRelationBusinessItemNames.Decimals, constructParams.Decimals); _rateIn = this.CreateSoundItem(OrderRelationBusinessItemNames.RateIn, constructParams.RateIn); _rateOut = this.CreateSoundItem(OrderRelationBusinessItemNames.RateOut, constructParams.RateOut); _commission = this.CreateSoundItem(OrderRelationBusinessItemNames.Commission, constructParams.Commission); _levy = this.CreateSoundItem(OrderRelationBusinessItemNames.Levy, constructParams.Levy); _otherFee = this.CreateSoundItem("OtherFee", constructParams.OtherFee); _interestPL = this.CreateSoundItem(OrderRelationBusinessItemNames.InterestPL, constructParams.InterestPL); _storagePL = this.CreateSoundItem(OrderRelationBusinessItemNames.StoragePL, constructParams.StoragePL); _tradePL = this.CreateSoundItem(OrderRelationBusinessItemNames.TradePL, constructParams.TradePL); _openOrderExecuteTime = this.CreateReadonlyItem("OpenOrderExecuteTime", constructParams.OpenOrderExecuteTime); _openOrderExecutePrice = this.CreateReadonlyItem("OpenOrderExecutePrice", constructParams.OpenOrderExecutePrice); _estimateCloseCommissionOfOpenOrder = this.CreateSoundItem("EstimateCloseCommissionOfOpenOrder", constructParams.EstimateCloseCommissionOfOpenOrder); _estimateCloseLevyOfOpenOrder = this.CreateSoundItem("EstimateCloseLevyOfOpenOrder", constructParams.EstimateCloseLevyOfOpenOrder); }
internal OrderRelationSettings(OrderRelation owner, Order closeOrder, OrderRelationConstructParams constructParams) : base(owner) { _closeOrder = closeOrder; this.Parse(constructParams); }