Пример #1
0
 // Token: 0x060043C8 RID: 17352 RVA: 0x00135A2C File Offset: 0x00133C2C
 internal void StartTracking(ref ContainerTracking <T> root)
 {
     if (root != null)
     {
         root._previous = this;
     }
     this._next = root;
     root       = this;
 }
Пример #2
0
        /// <summary>
        ///     Adds this tracker to the list of active containers.
        /// </summary>
        /// <param name="root">The root of the list.</param>
        internal void StartTracking(ref ContainerTracking <T> root)
        {
            // Add the node to the root
            if (root != null)
            {
                root._previous = this;
            }

            _next = root;
            root  = this;
        }
Пример #3
0
        /// <summary>
        ///     Checks that this tracker is present in the list starting with root.  It's a linear walk through the list, so should be used
        ///     mostly for debugging
        /// </summary>
        private bool IsInList(ContainerTracking <T> root)
        {
            ContainerTracking <T> node = root;

            while (node != null)
            {
                if (node == this)
                {
                    return(true);
                }

                node = node._next;
            }

            return(false);
        }
Пример #4
0
 // Token: 0x060043C9 RID: 17353 RVA: 0x00135A48 File Offset: 0x00133C48
 internal void StopTracking(ref ContainerTracking <T> root)
 {
     if (this._previous != null)
     {
         this._previous._next = this._next;
     }
     if (this._next != null)
     {
         this._next._previous = this._previous;
     }
     if (root == this)
     {
         root = this._next;
     }
     this._previous = null;
     this._next     = null;
 }
Пример #5
0
        /// <summary>
        ///     Removes this tracker from the list of active containers.
        /// </summary>
        /// <param name="root">The root of the list.</param>
        internal void StopTracking(ref ContainerTracking <T> root)
        {
            // Unhook the node from the list
            if (_previous != null)
            {
                _previous._next = _next;
            }

            if (_next != null)
            {
                _next._previous = _previous;
            }

            // Update the root reference
            if (root == this)
            {
                root = _next;
            }

            // Clear the node's references
            _previous = null;
            _next     = null;
        }
Пример #6
0
 /// <summary>
 ///     Instantiates a new instance of this class.
 /// </summary>
 public DataGridCell()
 {
     _tracker = new ContainerTracking <DataGridCell>(this);
 }
Пример #7
0
 internal void Debug_AssertNotInList(ContainerTracking <T> root)
 {
 }
Пример #8
0
        internal void Debug_AssertNotInList(ContainerTracking <T> root)
        {
#if DEBUG
            Debug.Assert(!IsInList(root), "This container shouldn't be in our tracking list");
#endif
        }
Пример #9
0
        internal void Debug_AssertIsInList(ContainerTracking <T> root)
        {
#if DEBUG
            Debug.Assert(IsInList(root), "This container should be in the tracking list.");
#endif
        }