void AddWork(CacheItem item, WorkItem.OperationType operationType, DateTime executeOn, bool toFront) { workTotal++; lock (workQueue) { var work = new WorkItem(item, operationType, executeOn); work.CacheItem = item; if (toFront) { workQueue.AddFirst(work); } else { workQueue.AddLast(work); } } }
void AddWork(string folder, string file, WorkItem.OperationType operationType, DateTime executeOn, bool toFront) { AddWork(new CacheItem { Folder = folder, FileName = file }, operationType, executeOn, toFront); }