public StockUpdate Create(StockTick delta) { return(new StockUpdate { Delta = delta, Image = Image == null ? delta : StockTick.Merge(Image, delta) }); }
public StockUpdate Create(StockTick delta) { return new StockUpdate { Delta = delta, Image = Image == null ? delta : StockTick.Merge(Image, delta) }; }
public static StockTick Merge(StockTick a, StockTick b) { return(new StockTick { Bid = b.Bid ?? a.Bid, Ask = b.Ask ?? a.Ask, Last = b.Last ?? a.Last, BidSize = b.BidSize ?? a.BidSize, AskSize = b.AskSize ?? a.AskSize, LastSize = b.LastSize ?? a.LastSize, Volume = b.Volume ?? a.Volume, QuoteTime = b.QuoteTime ?? a.QuoteTime, TradeTime = b.TradeTime ?? a.TradeTime, }); }
public static StockTick Merge(StockTick a, StockTick b) { return new StockTick { Bid = b.Bid ?? a.Bid, Ask = b.Ask ?? a.Ask, Last = b.Last ?? a.Last, BidSize = b.BidSize ?? a.BidSize, AskSize = b.AskSize ?? a.AskSize, LastSize = b.LastSize ?? a.LastSize, Volume = b.Volume ?? a.Volume, QuoteTime = b.QuoteTime ?? a.QuoteTime, TradeTime = b.TradeTime ?? a.TradeTime, }; }