public SuspendChangeNotificationsToken(FastObservableCollection <T> collection) { Argument.IsNotNull("collection", collection); _collection = collection; _oldSuspendChangeNotifications = _collection._suspendChangeNotifications; _collection._suspendChangeNotifications = true; }
public void Dispose() { if (_collection != null) { _collection._suspendChangeNotifications = _oldSuspendChangeNotifications; _collection.NotifyChanges(); _collection = null; } }
public void Dispose() { if (_collection != null) { _collection._suspendChangeNotifications = _oldSuspendChangeNotifications; if (_collection.IsDirty && !_collection._suspendChangeNotifications) { _collection.IsDirty = false; _collection.NotifyChanges(); } _collection = null; } }