opened
DanielKuehner
username_0
### Feature description

Introduce the new MixedConsolidate which consolidates the multiply events of mode MixedBash as the following example demonstrates:
`using (list.SuspendChangeNotifications(SuspensionMode.MixedConsolidate))`
`    {`
`        list.Add(1)`
`        list.Add(2)`
`        list.Add(3)`
`        list.Remove(3)`
`        list.Remove(2)`
`        list.Add(2)`
`    }`

Will raise only this event:
1. Add; NewItems = {1,2}

So events adding and removing the same items are consolidated to reduce the amount of fired events.
Introduce new MixedConsolidate mode for FastObservableCollection
issue
created
DanielKuehner
username_0
Some implementation details dicussed with @GeertvanHorrik and @username_1:
- This mode does not collect any more data or does process data while the suspension is active
- When the suspension is ended the collected data of the Mixed mode are used to produce the new events
- This post processing is placed within an extension
comment
created
DanielKuehner
username_0
Chat discussion starts here: https://gitter.im/Catel/Catel?at=59919e82bc46472974802f9d
comment
created
DanielKuehner
username_0
I have merged from #1095/#1098 to have a up to date code base.
Than I did a raw take over from #1091 so you can see your code in the original state for which the two unit tests are succeeding.
Now I will refactor the code.
comment
created
DanielKuehner
username_0
Wow, I am proud to say that our post processing idea seems to work and Alexanders approach has shrinked to minimum of lines. I hope you take this a starting point - but I believe FOC is done at all :-)
I hade not to do any changes to the my Mixed mode approach. All fits together - I am very happy.
comment
created
DanielKuehner
username_0
If you want I can recreate my hybrid branch after the other PR is accepted.
comment
created
alexfdezsauco
username_1
Great
comment
created
DanielKuehner
username_0
@username_1 I have added many unit tests (copied from Mixed mode) but most of them fail. I think most of them are because of different expectations. So I believe it is up to you what to expect and than change your approach.
comment
created
alexfdezsauco
username_1
Agree
comment
created
DanielKuehner
username_0
@GeertvanHorrik, @username_1: how to proceed with my branch? It is fully merged with the other branches. Just leave it or create a pull requests?
comment
created
alexfdezsauco
username_1
Just renamed a single test because MixedConsolidated raises a single event for

    using (sourceCollection.SuspendChangeNotifications(SuspensionMode.MixedConsolidate))
    {
        sourceCollection.Add(2); // { 2 }
        sourceCollection.Add(1); // { 2, 1 }
        sourceCollection.Move(1, 0); // { 1, 2 }
    }

Add - {1,2}
comment
closed
alexfdezsauco
username_1
issue