reactiveui/ReactiveUI — pull request #327 by niik (2013-06-23 22:36:49+00:00)
Title: WIP: Move collection notification support

**Don't merge, this is here for reference only for now**

The goal of this PR is to investigate whether or not supporting [NotifyCollectionChangedAction.Move](http://msdn.microsoft.com/en-us/library/system.collections.specialized.notifycollectionchangedaction(v=vs.95).aspx) in ReactiveCollections and ReactiveDerivedCollections is a good idea or not.

### The problem
The problem is twofold. By not having any notion of a Move notification derived collection can't reliably be used with ```ObservableCollections``` or other collections that implement ```INotifyCollectionChanged```. Adding support for _receiving_ Move notification shouldn't be controversial.

The second part is on the notification side. When a derived collection gets notified about a property change it's possible that the derived collection orderer function requires the item to move for the list to still be sorted. This is currently implemented as a remove and then add. Both the Remove and the Add raises events on their own such that non Rx code may be executed in between the two thus causing a reentrancy problem.

By raising a single Move notification instead the resorting becomes atomic and should in theory solve this reentrancy problem.

### Upsides

* Single atomic event for moves, preventing reentrancy issues
* Full compatibility with INotifyCollectionChanged
* Potential for ui controls to do clever things/animations for item moves when the semantics goes all the way down to the ui layer.

### Downsides
* Derived collections potentially isn't just about adds/removes any more (then again they weren't before either if you consider resets)
* Silverlight doesn't support it, we'll have to ifdef a bit to work around it
* Since Move isn't really widely used it's unknown how good the support is for it in the ui controls

### TODO
- [ ] Decide whether or not it's a good idea
- [ ] Move is not supported in silverlight, ifdef moves away and use remove/and add as substitute
- [ ] Implement ItemMoved rx-y observable on ReactiveCollection