From f8379ac6d9677f13c462f8b24678149cf7a0bed7 Mon Sep 17 00:00:00 2001 From: neuecc Date: Thu, 15 Feb 2024 17:21:09 +0900 Subject: [PATCH] f2 --- sandbox/ConsoleApp/Program.cs | 2 -- sandbox/WpfApp/MainWindow.xaml.cs | 4 ++-- src/ObservableCollections/IObservableCollection.cs | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) 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 { }