Exemplo n.º 1
0
 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);
         }
     }
 }
Exemplo n.º 2
0
 void AddWork(string folder, string file, WorkItem.OperationType operationType, DateTime executeOn, bool toFront)
 {
     AddWork(new CacheItem {
         Folder = folder, FileName = file
     }, operationType, executeOn, toFront);
 }