public virtual Boolean MoveNext() { Boolean result; if (!Completed) { if (ProgressQueue.Count > 0) { TreeNodeType node = ProgressQueue.Dequeue(); foreach (TreeNodeType child in node.Children) { ProgressQueue.Enqueue(child); } CurrentItem = node; } else // Enumeration is complete. { CurrentItem = InvalidItem; Completed = true; } result = !CurrentItem.Equals(InvalidItem); } else { result = false; } return(result); }
public virtual void Reset() { CurrentItem = InvalidItem; Completed = false; ProgressQueue.Clear(); ProgressQueue.Enqueue(Root); }
public void WriteProgress(long sourceId, ProgressRecordEx progressRecord) { ProgressQueue.Enqueue(progressRecord); WriteProtectedProgress(() => realWriter.WriteProgress(sourceId, progressRecord)); }
public void WriteProgress(ProgressRecordEx progressRecord) { ProgressQueue.Enqueue(progressRecord); WriteProtectedProgress(() => realWriter.WriteProgress(progressRecord)); }