diff --git a/src/ObservableCollections/IObservableCollection.cs b/src/ObservableCollections/IObservableCollection.cs index 2c8691b..9394f88 100644 --- a/src/ObservableCollections/IObservableCollection.cs +++ b/src/ObservableCollections/IObservableCollection.cs @@ -58,6 +58,7 @@ namespace ObservableCollections void SetToSourceCollection(int index, T value); void AddToSourceCollection(T value); IWritableSynchronizedViewList ToWritableViewList(WritableViewChangedEventHandler converter); + NotifyCollectionChangedSynchronizedViewList ToWritableNotifyCollectionChanged(); NotifyCollectionChangedSynchronizedViewList ToWritableNotifyCollectionChanged(WritableViewChangedEventHandler converter); NotifyCollectionChangedSynchronizedViewList ToWritableNotifyCollectionChanged(ICollectionEventDispatcher? collectionEventDispatcher); NotifyCollectionChangedSynchronizedViewList ToWritableNotifyCollectionChanged(WritableViewChangedEventHandler converter, ICollectionEventDispatcher? collectionEventDispatcher); diff --git a/src/ObservableCollections/ObservableList.Views.cs b/src/ObservableCollections/ObservableList.Views.cs index 7581db2..08fa810 100644 --- a/src/ObservableCollections/ObservableList.Views.cs +++ b/src/ObservableCollections/ObservableList.Views.cs @@ -373,6 +373,17 @@ namespace ObservableCollections return new FiltableSynchronizedViewList(this, isSupportRangeFeature: true, converter: converter); } + public NotifyCollectionChangedSynchronizedViewList ToWritableNotifyCollectionChanged() + { + return new FiltableSynchronizedViewList(this, + isSupportRangeFeature: false, + converter: static (TView newView, T originalValue, ref bool setValue) => + { + setValue = true; + return originalValue; + }); + } + public NotifyCollectionChangedSynchronizedViewList ToWritableNotifyCollectionChanged(WritableViewChangedEventHandler converter) { return new FiltableSynchronizedViewList(this, isSupportRangeFeature: false, converter: converter);