public PositionMessage(IPosition position) : this() { if (position != null) { this.SymbolName = position.symbol.name; this.Price = position.price; this.Quantity = position.quantity; this.Status = position.status; this.Basis = position.basis; if (position.trades != null) { foreach (ITrade t in position.trades) { Trades.Add(new TradeMessage(t)); } } } }
public PositionMessage(IPosition position) : this() { if (position != null) { this.SymbolName = position.symbol.name; this.Price = position.price; this.Quantity = position.quantity; this.Status = position.status; this.Basis = position.basis; if (position.trades != null) { foreach (ITrade t in position.trades) { Trades.Add(new TradeMessage(t)); } } } }