Beispiel #1
0
 // Token: 0x060004FA RID: 1274 RVA: 0x0000E044 File Offset: 0x0000C244
 public void AddWalker(object data, DescendentsWalkerBase walker)
 {
     FrameworkContextData.WalkerEntry item = default(FrameworkContextData.WalkerEntry);
     item.Data   = data;
     item.Walker = walker;
     this._currentWalkers.Add(item);
 }
Beispiel #2
0
        //
        // Property Invalidation of Inheritable Properties
        //
        // At the context level, we need to keep track of all inheritable property invalidations currently
        // in action.  The reason that there can be multiple invalidations going on at the same time is because
        // an invalidation of one property can cause an invalidation of a different property.  The result is that
        // the first invalidation *pauses* while the second invalidation is delivered to the tree.
        //
        // We keep track of these invalidations to be able to optimize a recursion of the same property
        // invalidation from an element to that element's children.  FrameworkElement.InvalidateTree will 
        // check the stack of walkers here and, if it finds a match, will conclude that a new DescendentsWalker
        // need not be spun up.  And there was much rejoicing.
        //

        public void AddWalker(object data, DescendentsWalkerBase walker)
        {
            // push a new walker on the top of the stack
            WalkerEntry walkerEntry = new WalkerEntry();
            walkerEntry.Data = data;
            walkerEntry.Walker = walker;
        
            _currentWalkers.Add(walkerEntry);
        }
        //
        // Property Invalidation of Inheritable Properties
        //
        // At the context level, we need to keep track of all inheritable property invalidations currently
        // in action.  The reason that there can be multiple invalidations going on at the same time is because
        // an invalidation of one property can cause an invalidation of a different property.  The result is that
        // the first invalidation *pauses* while the second invalidation is delivered to the tree.
        //
        // We keep track of these invalidations to be able to optimize a recursion of the same property
        // invalidation from an element to that element's children.  FrameworkElement.InvalidateTree will
        // check the stack of walkers here and, if it finds a match, will conclude that a new DescendentsWalker
        // need not be spun up.  And there was much rejoicing.
        //

        public void AddWalker(object data, DescendentsWalkerBase walker)
        {
            // push a new walker on the top of the stack
            WalkerEntry walkerEntry = new WalkerEntry();

            walkerEntry.Data   = data;
            walkerEntry.Walker = walker;

            _currentWalkers.Add(walkerEntry);
        }
Beispiel #4
0
        public void RemoveWalker(object data, DescendentsWalkerBase walker)
        {
            // pop the walker off the top of the stack
            int last = _currentWalkers.Count - 1;
#if DEBUG        
            WalkerEntry walkerEntry = _currentWalkers[last];
        
            Debug.Assert((walkerEntry.Data == data) && (walkerEntry.Walker == walker),
                "Inheritance DescendentsWalker tracker removal failed");
#endif        
            _currentWalkers.RemoveAt(last);
        }
        public void RemoveWalker(object data, DescendentsWalkerBase walker)
        {
            // pop the walker off the top of the stack
            int last = _currentWalkers.Count - 1;

#if DEBUG
            WalkerEntry walkerEntry = _currentWalkers[last];

            Debug.Assert((walkerEntry.Data == data) && (walkerEntry.Walker == walker),
                         "Inheritance DescendentsWalker tracker removal failed");
#endif
            _currentWalkers.RemoveAt(last);
        }
Beispiel #6
0
        // Token: 0x060004FB RID: 1275 RVA: 0x0000E078 File Offset: 0x0000C278
        public void RemoveWalker(object data, DescendentsWalkerBase walker)
        {
            int index = this._currentWalkers.Count - 1;

            this._currentWalkers.RemoveAt(index);
        }