Example #1
0
                protected bool AdvanceLeadUntilAllAligned()
                {
                    var doc = Lead.Current;

                    for (int index = 1; index < Enumerators.Count; ++index)
                    {
                        if (Enumerators[index].Current < doc)
                        {
                            Enumerators[index].Advance(doc);
                            if (Enumerators[index].Current > doc)
                            {
                                if (!Lead.Advance(Enumerators[index].Current))
                                {
                                    return(false);
                                }
                                doc   = Lead.Current;
                                index = 0; // 0 Because it will be incremented next loop to 1
                            }
                        }
                    }
                    return(true);
                }
Example #2
0
 public bool Advance(int target)
 {
     return(Lead.Advance(target) && AdvanceLeadUntilAllAligned());
 }