diff --git a/src/DynamicData.Tests/API/ApiApprovalTests.DynamicDataTests.DotNet8_0.verified.txt b/src/DynamicData.Tests/API/ApiApprovalTests.DynamicDataTests.DotNet8_0.verified.txt index 5ee7dd30..55e3576c 100644 --- a/src/DynamicData.Tests/API/ApiApprovalTests.DynamicDataTests.DotNet8_0.verified.txt +++ b/src/DynamicData.Tests/API/ApiApprovalTests.DynamicDataTests.DotNet8_0.verified.txt @@ -736,12 +736,6 @@ namespace DynamicData void AddOrUpdate(TObject item, TKey key); void Clear(); void Clone(DynamicData.IChangeSet changes); - [System.Obsolete("Use Refresh: Same thing but better semantics")] - void Evaluate(); - [System.Obsolete("Use Refresh: Same thing but better semantics")] - void Evaluate(System.Collections.Generic.IEnumerable keys); - [System.Obsolete("Use Refresh: Same thing but better semantics")] - void Evaluate(TKey key); TKey GetKey(TObject item); System.Collections.Generic.IEnumerable> GetKeyValues(System.Collections.Generic.IEnumerable items); void Refresh(); @@ -951,10 +945,6 @@ namespace DynamicData void AddOrUpdate(TObject item); void AddOrUpdate(System.Collections.Generic.IEnumerable items, System.Collections.Generic.IEqualityComparer comparer); void AddOrUpdate(TObject item, System.Collections.Generic.IEqualityComparer comparer); - [System.Obsolete("Use Refresh: Same thing but better semantics")] - void Evaluate(System.Collections.Generic.IEnumerable items); - [System.Obsolete("Use Refresh: Same thing but better semantics")] - void Evaluate(TObject item); void Load(System.Collections.Generic.IEnumerable items); void Refresh(System.Collections.Generic.IEnumerable items); void Refresh(TObject item); @@ -1295,18 +1285,6 @@ namespace DynamicData public static System.IObservable> EnsureUniqueKeys(this System.IObservable> source) where TObject : notnull where TKey : notnull { } - [System.Obsolete("Use Refresh: Same thing but better semantics")] - public static void Evaluate(this DynamicData.ISourceCache source) - where TObject : notnull - where TKey : notnull { } - [System.Obsolete("Use Refresh: Same thing but better semantics")] - public static void Evaluate(this DynamicData.ISourceCache source, System.Collections.Generic.IEnumerable items) - where TObject : notnull - where TKey : notnull { } - [System.Obsolete("Use Refresh: Same thing but better semantics")] - public static void Evaluate(this DynamicData.ISourceCache source, TObject item) - where TObject : notnull - where TKey : notnull { } public static System.IObservable> Except(this DynamicData.IObservableList> sources) where TObject : notnull where TKey : notnull { } diff --git a/src/DynamicData/Cache/ICacheUpdater.cs b/src/DynamicData/Cache/ICacheUpdater.cs index 09d0cfae..851dc926 100644 --- a/src/DynamicData/Cache/ICacheUpdater.cs +++ b/src/DynamicData/Cache/ICacheUpdater.cs @@ -51,26 +51,6 @@ public interface ICacheUpdater : IQuery /// The changes to clone. void Clone(IChangeSet changes); - /// - /// Sends a signal for operators to recalculate it's state. - /// - [Obsolete(Constants.EvaluateIsDead)] - void Evaluate(); - - /// - /// Refreshes the items matching the specified keys. - /// - /// The keys. - [Obsolete(Constants.EvaluateIsDead)] - void Evaluate(IEnumerable keys); - - /// - /// Refreshes the item matching the specified key. - /// - /// The key to evaluate. - [Obsolete(Constants.EvaluateIsDead)] - void Evaluate(TKey key); - /// /// Gets the key associated with the object. /// diff --git a/src/DynamicData/Cache/ISourceUpdater.cs b/src/DynamicData/Cache/ISourceUpdater.cs index 982daa92..e6ad820a 100644 --- a/src/DynamicData/Cache/ISourceUpdater.cs +++ b/src/DynamicData/Cache/ISourceUpdater.cs @@ -47,20 +47,6 @@ public interface ISourceUpdater : ICacheUpdater /// The comparer. void AddOrUpdate(TObject item, IEqualityComparer comparer); - /// - /// Refreshes the specified items. - /// - /// The items. - [Obsolete(Constants.EvaluateIsDead)] - void Evaluate(IEnumerable items); - - /// - /// Refreshes the specified item. - /// - /// The item. - [Obsolete(Constants.EvaluateIsDead)] - void Evaluate(TObject item); - /// /// Clears existing values and loads the specified items. /// diff --git a/src/DynamicData/Cache/Internal/CacheUpdater.cs b/src/DynamicData/Cache/Internal/CacheUpdater.cs index 9f4ab8a8..f7615436 100644 --- a/src/DynamicData/Cache/Internal/CacheUpdater.cs +++ b/src/DynamicData/Cache/Internal/CacheUpdater.cs @@ -174,21 +174,6 @@ public void AddOrUpdate(IEnumerable> itemsPairs) public void Clone(IChangeSet changes) => _cache.Clone(changes); - [Obsolete(Constants.EvaluateIsDead)] - public void Evaluate(IEnumerable keys) => Refresh(keys); - - [Obsolete(Constants.EvaluateIsDead)] - public void Evaluate(IEnumerable items) => Refresh(items); - - [Obsolete(Constants.EvaluateIsDead)] - public void Evaluate(TObject item) => Refresh(item); - - [Obsolete(Constants.EvaluateIsDead)] - public void Evaluate() => Refresh(); - - [Obsolete(Constants.EvaluateIsDead)] - public void Evaluate(TKey key) => Refresh(key); - public TKey GetKey(TObject item) { if (_keySelector is null) diff --git a/src/DynamicData/Cache/ObservableCacheEx.cs b/src/DynamicData/Cache/ObservableCacheEx.cs index e969b914..38737f82 100644 --- a/src/DynamicData/Cache/ObservableCacheEx.cs +++ b/src/DynamicData/Cache/ObservableCacheEx.cs @@ -1205,59 +1205,6 @@ public static IObservable> EnsureUniqueKeys(source).Run(); } - /// - /// Signal observers to re-evaluate the specified item. - /// - /// The type of the object. - /// The type of the key. - /// The source. - /// The item. - /// source. - [Obsolete(Constants.EvaluateIsDead)] - public static void Evaluate(this ISourceCache source, TObject item) - where TObject : notnull - where TKey : notnull - { - source.ThrowArgumentNullExceptionIfNull(nameof(source)); - - source.Edit(updater => updater.Refresh(item)); - } - - /// - /// Signal observers to re-evaluate the specified items. - /// - /// The type of the object. - /// The type of the key. - /// The source. - /// The items. - /// source. - [Obsolete(Constants.EvaluateIsDead)] - public static void Evaluate(this ISourceCache source, IEnumerable items) - where TObject : notnull - where TKey : notnull - { - source.ThrowArgumentNullExceptionIfNull(nameof(source)); - - source.Edit(updater => updater.Refresh(items)); - } - - /// - /// Signal observers to re-evaluate the all items. - /// - /// The type of the object. - /// The type of the key. - /// The source. - /// source. - [Obsolete(Constants.EvaluateIsDead)] - public static void Evaluate(this ISourceCache source) - where TObject : notnull - where TKey : notnull - { - source.ThrowArgumentNullExceptionIfNull(nameof(source)); - - source.Edit(updater => updater.Refresh()); - } - /// /// Dynamically apply a logical Except operator between the collections /// Items from the first collection in the outer list are included unless contained in any of the other lists. diff --git a/src/DynamicData/Constants.cs b/src/DynamicData/Constants.cs index 961cb23b..6edc84ed 100644 --- a/src/DynamicData/Constants.cs +++ b/src/DynamicData/Constants.cs @@ -6,7 +6,6 @@ namespace DynamicData; internal static class Constants { - public const string EvaluateIsDead = "Use Refresh: Same thing but better semantics"; public const string VirtualizeIsObsolete = "Use SortAndVirtualize as it's more efficient"; public const string PageIsObsolete = "Use SortAndPage as it's more efficient"; public const string TopIsObsolete = "Use Overload with comparer as it's more efficient";