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

The issue that the CollectionChanged event raised from ObservableCollection changes with ReadOnlyReactiveCollection #178

Merged
merged 4 commits into from
Sep 11, 2020

Conversation

runceel
Copy link
Owner

@runceel runceel commented Sep 10, 2020

#177

Current behavior

Code

var c = new ObservableCollection<string>();
var rc = c.ToReadOnlyReactiveCollection();
((INotifyCollectionChanged)rc).CollectionChanged += (_, e) =>
{
    Console.WriteLine($"{e.Action}");
};

c.Add("a");
c.Add("b");
c.Add("c");
c.Move(0, 1);

Output

Add
Add
Add
Remove
Add

Expected output

Add
Add
Add
Move

@runceel runceel merged commit df82671 into main Sep 11, 2020
@runceel runceel deleted the fix/issue177 branch December 28, 2020 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ToReadOnlyReactiveCollectionすると発行されるNotifyCollectionChangedActionが変わる
1 participant