Esempio n. 1
0
 public bool ShouldUpdate(BookSource books, VolumeSource volumes, out Date date)
 {
     var progress = Log.Action(3, "Checking local catalog...");
     progress.Continue("Opening local catalog...");
     if (books.Exists && volumes.Exists) {
         progress.Continue("Getting local creation date...");
         date = Date.Min(books.GetCreated(), volumes.GetCreated());
         Log.Verbose("Local creation date: {0}.", date);
         if (new Date(DateTime.Now) == date) {
             Log.Warning("Local catalog up-to-date.");
             progress.Finish();
             return false;
         }
     } else {
         date = Date.MinValue;
     }
     progress.Finish();
     return true;
 }