public Trade(ProcessedTrade trade) { InputId = trade.InputId; TradeId = trade.TradeId; TradeType = trade.TradeType; Instrument = trade.Instrument; Quantity = trade.Quantity; Price = trade.Price; BuySell = trade.BuySell; CreatedOn = DateTime.Now; TradeStatus = trade.TradeStatus; IsActive = trade.IsActive; IsProcessed = trade.IsProcessed; Version = trade.Version; }
private Trade UpdatePrice(ProcessedTrade trade, Dictionary <string, Tuple <int, double> > dict) { if (dict.ContainsKey(trade.TradeId)) { trade.NewPrice = dict[trade.TradeId].Item2; } return(new Trade(trade)); }