Exemple #1
0
 public static async Task <bool> IsStatusExistsAsync(long id)
 {
     if (_statusQueue.Contains(id))
     {
         return(true);
     }
     return(await DatabaseUtil.RetryIfLocked(
                async() => await Database.StatusCrud.GetAsync(id)) != null);
 }
 public bool Update(ITask task)
 {
     if (_tasks.Contains(task))
     {
         _deadTasks++;
         _tasks.Remove(task);
         return(true);
     }
     else
     {
         return(false);
     }
 }