Beispiel #1
0
            public SuspendChangeNotificationsToken(FastObservableCollection <T> collection)
            {
                Argument.IsNotNull("collection", collection);

                _collection = collection;
                _oldSuspendChangeNotifications          = _collection._suspendChangeNotifications;
                _collection._suspendChangeNotifications = true;
            }
Beispiel #2
0
 public void Dispose()
 {
     if (_collection != null)
     {
         _collection._suspendChangeNotifications = _oldSuspendChangeNotifications;
         _collection.NotifyChanges();
         _collection = null;
     }
 }
Beispiel #3
0
            public void Dispose()
            {
                if (_collection != null)
                {
                    _collection._suspendChangeNotifications = _oldSuspendChangeNotifications;
                    if (_collection.IsDirty && !_collection._suspendChangeNotifications)
                    {
                        _collection.IsDirty = false;
                        _collection.NotifyChanges();
                    }

                    _collection = null;
                }
            }