Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List-to-List MergeManyChangeSets #780

Merged

Conversation

dwcullop
Copy link
Member

@dwcullop dwcullop commented Dec 4, 2023

Description

Implements the MergeManyChangeSets operator for cases when both the Parent and Child ChangeSets are List Changes. It requires only a single prototype:

IObservable<IChangeSet<TDestination>> MergeManyChangeSets<TObject, TDestination>(this IObservable<IChangeSet<TObject>> source, Func<TObject, IObservable<IChangeSet<TDestination>>> observableSelector);

The implementation is very similar to the Cache version except the Change Tracker is much simpler because it doesn't have to deal with duplicate keys.

Testing

In addition to verifying Null handling and OnComplete/OnError behavior, the Unit Tests cover the following operations for both the Source and Child lists:

  1. Add
  2. AddRange
  3. Insert
  4. Remove
  5. RemoveAt
  6. RemoveMany
  7. RemoveRange
  8. Replace
  9. Clear

Other Changes

Other changes include:

  1. Adding use of Bogus library to generate test data
  2. Various code modernization changes consistent with similar recent efforts
  3. Minor comment improvements

@dwcullop dwcullop enabled auto-merge (squash) December 4, 2023 22:24
Copy link
Collaborator

@RolandPheasant RolandPheasant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me. Low risk, and I'm sure you'll test them all out on your daytime projects.

@dwcullop dwcullop merged commit 102fa7a into reactivemarbles:main Dec 4, 2023
1 check passed
@dwcullop dwcullop deleted the feature/list-list-mergemanychangesets branch December 4, 2023 23:32
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 19, 2023
@dwcullop dwcullop self-assigned this Dec 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants