Example #1
0
 private void CleanUp()
 {
     if (_snapshotElement != null)
     {
         _snapshotElement.ReleaseListeners();
         _snapshotElement = null;
     }
     _modifiedProperties.Clear();
     IsDirty = false;
 }
Example #2
0
        /// <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);
        }
Example #3
0
 internal void MarkPropertyAsUnchanged(SnapshotElement propertySnapshot)
 {
     this._modifiedProperties.Remove(propertySnapshot);
     UpdateDirtyState();
 }