public void SaveHistoryContinuationPoint(Guid id, object continuationPoint)
{
if (continuationPoint == null) throw new ArgumentNullException("continuationPoint");
lock (m_lock)
{
if (m_historyContinuationPoints == null)
{
m_historyContinuationPoints = new List<HistoryContinuationPoint>();
}
// remove existing continuation point if space needed.
while (m_historyContinuationPoints.Count >= m_maxHistoryContinuationPoints)
{
HistoryContinuationPoint oldCP = m_historyContinuationPoints[0];
m_historyContinuationPoints.RemoveAt(0);
Utils.SilentDispose(oldCP.Value);
}
// create the cp.
HistoryContinuationPoint cp = new HistoryContinuationPoint();
cp.Id = id;
cp.Value = continuationPoint;
cp.Timestamp = DateTime.UtcNow;
m_historyContinuationPoints.Add(cp);
}
}