ReactiveCollection<Hoge> Hoges;
// Hogesにかかるあらゆる変更を取得する
IObservable<ReactiveCollection<Hoge>> observeChanged;
public IObservable<ReactiveCollection<Hoge>> ObserveChanged()
{
if (observeChanged == null)
{
observeChanged = Hoges.ObserveReplace().Select(x => Hoges)
.Merge(Hoges.ObserveCountChanged().Select(x => Hoges))
.Publish()
.RefCount();
}
return observeChanged;
}
ReactiveCollection のAdd,Remove,Replace,Clearあたりで毎回通知が来る奴