Skip to content

Commit

Permalink
ModifiedProperties changed to HashSet<string> to avoid possiblity of …
Browse files Browse the repository at this point in the history
…duplicate property names.
  • Loading branch information
Shimmy Weitzhandler authored and Anthony Sneed committed Nov 30, 2017
1 parent 8e31cd4 commit c98ffec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Source/TrackableEntities.Client/ChangeTrackingCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,8 @@ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
|| entity.TrackingState == TrackingState.Modified)
{
if (entity.ModifiedProperties == null)
entity.ModifiedProperties = new List<string>();
if (!entity.ModifiedProperties.Contains(e.PropertyName))
entity.ModifiedProperties.Add(e.PropertyName);
entity.ModifiedProperties = new HashSet<string>();
entity.ModifiedProperties.Add(e.PropertyName);
}
}
}
Expand Down

0 comments on commit c98ffec

Please sign in to comment.