Exemple #1
0
        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;
        }
Exemple #2
0
        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;
        }
Exemple #3
0
 public SnapshotStorage()
 {
     First = null;
     Last  = null;
 }