⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 l2listelem.cs

📁 Perst开源实时数据库
💻 CS
字号:
namespace Perst
{
    using System;

    /// <summary>
    /// Double linked list element.
    /// </summary>
#if USE_GENERICS
    public class L2ListElem<T> : Persistent where T:L2ListElem<T>
    { 
        internal T next;
        internal T prev;
#else
    public class L2ListElem : PersistentResource 
    { 
        internal L2ListElem next;
        internal L2ListElem prev;
#endif    
        /// <summary>
        /// Get next list element. 
        /// Been call for the last list element, this method will return first element of the list 
        /// or list header
        /// </summary>
#if USE_GENERICS
        public T Next
#else
        public L2ListElem Next
#endif
        { 
            get 
            {
                return next;
            }
        }

        /// <summary>
        /// Get previous list element. 
        /// Been call for the first list element, this method will return last element of the list 
        /// or list header
        /// </summary>
#if USE_GENERICS
        public T Prev 
#else
        public L2ListElem Prev 
#endif
        { 
            get 
            {
                return prev;
            }
        }

        /// <summary>
        /// Make list empty. 
        /// This method should be applied to list header. 
        /// </summary>
        public void Prune() 
        { 
            Modify();
            next = prev = null;
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -