public void Add(NetworkPairVolumeData data, bool isAgg, bool isReversed) { if (isAgg) { UtcLastAgg = DateTime.UtcNow; } if (isReversed) { if (isAgg) { UtcLastAggReversed = DateTime.UtcNow; } else { UtcLastReversed = DateTime.UtcNow; } } var list = isAgg ? aggs : direct; foreach (var v in data) { list.Add(v); } }
/// <summary> /// return true if an insert occured /// </summary> /// <param name="data"></param> /// <returns></returns> public bool AddRange(NetworkPairVolumeData data) { var i = false; foreach (var d in data) { i = i || Add(d); } return(i); }