public void PurgeAll() { var holder = First; while (holder != null) { var next = holder.Next; holder.Previous = null; holder.Next = null; holder = next; } First = null; Last = null; }
public void Add(int tick, long tagTime, Snapshot snapshot) { var holder = new SnapshotInfo { Tick = tick, TagTime = tagTime, Snapshot = snapshot, Next = null, Previous = null }; holder.Next = null; holder.Previous = Last; if (Last != null) { Last.Next = holder; } else { First = holder; } Last = holder; }
public SnapshotStorage() { First = null; Last = null; }