Exemple #1
0
        public override void Shift()
        {
            var segments = WindowList.TakeWhile(s => s.StateInWindow == State.Confirmed);

            OutputList.AddRange(segments);

            WindowList.RemoveRange(0, segments.Count());
        }
Exemple #2
0
        public int UnconfirmedSegments()
        {
            if (WindowList.Any() && (WindowList.First().StateInWindow == State.Confirmed))
            {
                return(0);
            }

            var unconfirmedSegs = WindowList.TakeWhile(s => s.StateInWindow == State.Unconfirmed);

            return(unconfirmedSegs.Count());
        }