Exemplo n.º 1
0
        static TimeExpirationLot GetTimer(int id)
        {
            TimeExpirationLot findedTimer = timers.Where(p => p.LotId == id).SingleOrDefault();

            if (findedTimer == null)
            {
                return(null);
            }
            return(findedTimer);
        }
Exemplo n.º 2
0
        static void DeleteLot(int id)
        {
            if (!isLotTimerExists(id))
            {
                return;
            }
            TimeExpirationLot findedTimer = timers.Where(p => p.LotId == id).SingleOrDefault();

            timers.Remove(findedTimer);
        }
Exemplo n.º 3
0
        static bool isLotTimerExists(int LotId)
        {
            TimeExpirationLot findedTimer = timers.Where(p => p.LotId == LotId).SingleOrDefault();

            if (findedTimer == null)
            {
                return(false);
            }
            return(true);
        }