private void CleanUp() { if (_snapshotElement != null) { _snapshotElement.ReleaseListeners(); _snapshotElement = null; } _modifiedProperties.Clear(); IsDirty = false; }
/// <summary> /// Makes a snapshot of the given object and starts dirty state detection /// </summary> /// <param name="obj"></param> public void Start(object obj) { if (obj == null) { throw new ArgumentNullException("obj"); } CleanUp(); _snapshotElement = SnaphotFactory.Create(this, obj); }
internal void MarkPropertyAsUnchanged(SnapshotElement propertySnapshot) { this._modifiedProperties.Remove(propertySnapshot); UpdateDirtyState(); }