public override void Shift() { var segments = WindowList.TakeWhile(s => s.StateInWindow == State.Confirmed); OutputList.AddRange(segments); WindowList.RemoveRange(0, segments.Count()); }
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()); }