ReactiveUI 3.2.0.0 曾经有实现 ObserveCollectionChanged() 方法的 CollectionExtensions 类。现在 ReactiveUI 4.0.2 下的方法在哪里?
private readonly ReactiveCollection<string> _sourceItems = new ReactiveCollection<string>();
private readonly ReactiveCollection<SelectableDataItem<string>> _selectableItemsView = null;
private readonly ReactiveCollection<SelectableDataItem<string>> _selectedItemsView = null;
private readonly ReactiveCollection<string> _selectedDataView = null;
....
this._sourceItems.ChangeTrackingEnabled = true;
this._selectableItemsView =
this.SourceItems.CreateDerivedCollection<string, SelectableDataItem<string>>(i => new SelectableDataItem<string>(i) { IsSelected = true, });
this._selectableItemsView.ChangeTrackingEnabled = true;
this._selectedItemsView =
this._selectableItemsView.CreateDerivedCollection<SelectableDataItem<string>, SelectableDataItem<string>>(
i => i,
f => f.IsSelected,
(i1, i2) => 0
);
this._selectedItemsView.ChangeTrackingEnabled = true;
this._selectedDataView =
this._selectableItemsView.CreateDerivedCollection<SelectableDataItem<string>, string>(i => i.Data, f => f.IsSelected, (i1, i2) => 0);
this._selectedDataView.ChangeTrackingEnabled = true;