Beispiel #1
0
        public virtual void Cleanup()
        {
            var items = Items;

            for (var i = items.Count - 1; i >= 0; --i)
            {
                if (i >= items.Count)
                {
                    continue;
                }

                if (items[i] is not BulletinMessage msg || msg.Deleted)
                {
                    continue;
                }

                if (msg.Thread == null && BulletinBoardSystem.CheckDeletionTime(msg.LastPostTime))
                {
                    msg.Delete();
                    var queue = PooledRefQueue <Item> .Create();

                    var thread = msg;

                    do
                    {
                        BFSDelete(thread, ref queue);
                        if (queue.Count > 0)
                        {
                            thread = (BulletinMessage)queue.Dequeue();
                        }
                    } while (thread != null);
                    queue.Dispose();
                }
            }
        }
Beispiel #2
0
        public virtual void Cleanup()
        {
            var items = Items;

            for (var i = items.Count - 1; i >= 0; --i)
            {
                if (i >= items.Count)
                {
                    continue;
                }

                if (!(items[i] is BulletinMessage msg))
                {
                    continue;
                }

                if (msg.Thread == null && BulletinBoardSystem.CheckDeletionTime(msg.LastPostTime))
                {
                    msg.Delete();
                    RecurseDelete(msg); // A root-level thread has expired
                }
            }
        }