示例#1
0
        protected override void OnChildPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            base.OnChildPropertyChanged(sender, e);
            if (NotifyResetOnChildPropertyChange && e.PropertyName != CountString && e.PropertyName != IndexerString &&
                e.PropertyName != "Capacity")
            {
                //System.Diagnostics.Debug.Print("Child Property Change: NOTIFIFYING RESET");
                NotifyCollectionChanged(CollectionChangedEventArgsBuilder.CreateResetAction());
            }

            //if (!NotifyResetOnChildPropertyChange)
            //{
            //	System.Diagnostics.Debug.Print("Child Property Change: RESET DISABLED");
            //}
        }
示例#2
0
        private void ClearItemsImplementation()
        {
            CheckReentrancy();

            //System.Diagnostics.Debug.IndentLevel++;
            //System.Diagnostics.Debug.Print("BEGIN CLEAR");
            if (_count <= 0)
            {
                return;
            }
            Array.Clear(_items, 0, _count);
            _count = 0;
            _version++;
            RecoverFreeSpace();
            NotifyPropertyChanged(propertyName: CountString);
            NotifyPropertyChanged(propertyName: IndexerString);
            NotifyCollectionChanged(CollectionChangedEventArgsBuilder.CreateResetAction());

            //System.Diagnostics.Debug.Print("END CLEAR");
            //System.Diagnostics.Debug.IndentLevel--;
        }