Exemplo n.º 1
0
            public ReaderProgressSinglyLinkedList(IEnumerable <TypeReaderFactory> typeReaders)
            {
                var progressRecords = typeReaders.Select(r =>
                                                         new ReaderProgress
                {
                    NextSequenceId = r.ReadNextSequenceId() ?? UInt32.MaxValue,     // TODO: Remove if nothing left
                    Reader         = r
                }).OrderBy(s => s.NextSequenceId);

                ReaderProgress last = null;

                foreach (var item in progressRecords)
                {
                    if (last == null)
                    {
                        _head = item;
                    }
                    else
                    {
                        AddAfter(last, item);
                    }

                    last = item;
                }
            }
 internal ReaderExtractionEventArgs(T entry, ReaderProgress readerProgress = null)
 {
     Item           = entry;
     ReaderProgress = readerProgress;
 }
Exemplo n.º 3
0
 public void RemoveFirst()
 {
     _head = _head.Next;
 }
Exemplo n.º 4
0
 public void AddAfter(ReaderProgress lastNode, ReaderProgress newNode)
 {
     newNode.Next  = lastNode.Next;
     lastNode.Next = newNode;
 }