diff --git a/sandbox/ConsoleApp/Program.cs b/sandbox/ConsoleApp/Program.cs index f2b8a02..0a55a4c 100644 --- a/sandbox/ConsoleApp/Program.cs +++ b/sandbox/ConsoleApp/Program.cs @@ -18,8 +18,6 @@ list.AddRange(new[] { 10, 20, 30 }); -return; - diff --git a/sandbox/WpfApp/MainWindow.xaml.cs b/sandbox/WpfApp/MainWindow.xaml.cs index afd9981..c7deb25 100644 --- a/sandbox/WpfApp/MainWindow.xaml.cs +++ b/sandbox/WpfApp/MainWindow.xaml.cs @@ -23,7 +23,7 @@ namespace WpfApp public partial class MainWindow : Window { ObservableList list; - public ISynchronizedView ItemsView { get; set; } + public INotifyCollectionChangedSynchronizedView ItemsView { get; set; } public MainWindow() { @@ -35,7 +35,7 @@ public MainWindow() list = new ObservableList(); list.AddRange(new[] { 1, 10, 188 }); - ItemsView = list.CreateSortedView(x => x, x => x, comparer: Comparer.Default).WithINotifyCollectionChanged(); + ItemsView = list.CreateSortedView(x => x, x => x, comparer: Comparer.Default).ToNotifyCollectionChanged(); BindingOperations.EnableCollectionSynchronization(ItemsView, new object()); diff --git a/src/ObservableCollections/IObservableCollection.cs b/src/ObservableCollections/IObservableCollection.cs index ca9d4de..42c7cec 100644 --- a/src/ObservableCollections/IObservableCollection.cs +++ b/src/ObservableCollections/IObservableCollection.cs @@ -45,7 +45,7 @@ public interface ISortableSynchronizedView : ISynchronizedView : IReadOnlyCollection, INotifyCollectionChanged, INotifyPropertyChanged + public interface INotifyCollectionChangedSynchronizedView : IReadOnlyCollection, INotifyCollectionChanged, INotifyPropertyChanged, IDisposable { }