Example #1
0
 private static NotQueuedEntry AddNotQueued(VisualBubble bubble, BubbleGroup group)
 {
     lock (_dbLock)
     {
         var bubbleId = bubble.ID;
         using (var db = new SqlDatabase <NotQueuedEntry>(NotQueuedLocation))
         {
             // don't add a duplicate group into the queue
             foreach (var possibleGroup in db.Store.Where(x => x.Guid == bubbleId))
             {
                 return(possibleGroup);
             }
             var entry = new NotQueuedEntry
             {
                 ServiceName     = group.Service.Information.ServiceName,
                 BubbleGroupGuid = group.ID,
                 Guid            = bubble.ID,
                 Time            = bubble.Time,
             };
             db.Add(entry);
             return(entry);
         }
     }
 }
 private static NotQueuedEntry AddNotQueued(VisualBubble bubble, BubbleGroup group)
 {
     lock (_dbLock)
     {
         var bubbleId = bubble.ID;
         using (var db = new SqlDatabase<NotQueuedEntry>(NotQueuedLocation))
         {
             // don't add a duplicate group into the queue
             foreach (var possibleGroup in db.Store.Where(x => x.Guid == bubbleId))
             {
                 return possibleGroup;
             }
             var entry = new NotQueuedEntry
             {
                 ServiceName = group.Service.Information.ServiceName,
                 BubbleGroupGuid = group.ID,
                 Guid = bubble.ID,
                 Time = bubble.Time,
             };
             db.Add(entry);
             return entry;
         }
     }
 }