Exemple #1
0
 public StockUpdate Create(StockTick delta)
 {
     return(new StockUpdate
     {
         Delta = delta,
         Image = Image == null ? delta : StockTick.Merge(Image, delta)
     });
 }
Exemple #2
0
 public StockUpdate Create(StockTick delta)
 {
     return new StockUpdate
     {
         Delta = delta,
         Image = Image == null ? delta : StockTick.Merge(Image, delta)
     };
 }
Exemple #3
0
 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,
     });
 }
Exemple #4
0
 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,
     };
 }