public OrderBookCacheObject Update(long timeStamp, OrderBook[] insert, OrderBook[] update, OrderBook[] delete) { Timestamp = timeStamp; insert.Each(item => { if (!OrderBook.TryAdd(item.Id, item)) { OrderBook[item.Id].PopulateWithNonDefaultValues(item); } }); update.Each(item => { if (OrderBook.ContainsKey(item.Id)) { OrderBook[item.Id].PopulateWithNonDefaultValues(item); } else { OrderBook.TryAdd(item.Id, item); } }); delete.Each(item => OrderBook.TryRemove(item.Id, out item)); return(this); }