Example #1
0
        /// <summary>
        /// Queries the IssuedTicket table, for any 'Expired' tickets trys to notify any users
        /// close any active data references and to delete the Issued Ticket. Then checks to 
        /// see if any of the ticket coupons no longer are needed and removes them.
        /// May be called directly as the standard Run method waits until the timeout is 
        /// done before calling this, useful for debugging.
        /// </summary>
        public void ProcessIssuedTickets()
        {
            BrokerDB brokerDb = new BrokerDB();

            try
            {
                List<Ticket> expired = brokerDb.GetExpiredIssuedTickets();
                if (expired.Count > 0)
                {
                    RemoveTickets(expired, brokerDb);
                }

            }
            catch (Exception e)
            {
                Utilities.WriteLog("TicketRemover: " + e.Message + ": " + Utilities.DumpException(e));
            }
        }