diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-02-24 19:56:08 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-09-14 16:59:29 -0400 |
commit | bad2ac2a29b8775be97133e4c4cfb67a4a7406ee (patch) | |
tree | 9cc61caa21be489a9eb6b67368e2c40aca17af80 /src/SMAPI/Framework/Content/AssetDataForDictionary.cs | |
parent | 4a297e29eb0c97be799ee3939e9747dc1c631427 (diff) | |
download | SMAPI-bad2ac2a29b8775be97133e4c4cfb67a4a7406ee.tar.gz SMAPI-bad2ac2a29b8775be97133e4c4cfb67a4a7406ee.tar.bz2 SMAPI-bad2ac2a29b8775be97133e4c4cfb67a4a7406ee.zip |
remove deprecated APIs (#606)
Diffstat (limited to 'src/SMAPI/Framework/Content/AssetDataForDictionary.cs')
-rw-r--r-- | src/SMAPI/Framework/Content/AssetDataForDictionary.cs | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/SMAPI/Framework/Content/AssetDataForDictionary.cs b/src/SMAPI/Framework/Content/AssetDataForDictionary.cs index 11a2564c..a331f38a 100644 --- a/src/SMAPI/Framework/Content/AssetDataForDictionary.cs +++ b/src/SMAPI/Framework/Content/AssetDataForDictionary.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; namespace StardewModdingAPI.Framework.Content { @@ -18,37 +17,5 @@ namespace StardewModdingAPI.Framework.Content /// <param name="onDataReplaced">A callback to invoke when the data is replaced (if any).</param> public AssetDataForDictionary(string locale, string assetName, IDictionary<TKey, TValue> data, Func<string, string> getNormalisedPath, Action<IDictionary<TKey, TValue>> onDataReplaced) : base(locale, assetName, data, getNormalisedPath, onDataReplaced) { } - -#if !SMAPI_3_0_STRICT - /// <summary>Add or replace an entry in the dictionary.</summary> - /// <param name="key">The entry key.</param> - /// <param name="value">The entry value.</param> - [Obsolete("Access " + nameof(AssetData<IDictionary<TKey, TValue>>.Data) + "field directly.")] - public void Set(TKey key, TValue value) - { - SCore.DeprecationManager.Warn($"AssetDataForDictionary.{nameof(Set)}", "2.10", DeprecationLevel.PendingRemoval); - this.Data[key] = value; - } - - /// <summary>Add or replace an entry in the dictionary.</summary> - /// <param name="key">The entry key.</param> - /// <param name="value">A callback which accepts the current value and returns the new value.</param> - [Obsolete("Access " + nameof(AssetData<IDictionary<TKey, TValue>>.Data) + "field directly.")] - public void Set(TKey key, Func<TValue, TValue> value) - { - SCore.DeprecationManager.Warn($"AssetDataForDictionary.{nameof(Set)}", "2.10", DeprecationLevel.PendingRemoval); - this.Data[key] = value(this.Data[key]); - } - - /// <summary>Dynamically replace values in the dictionary.</summary> - /// <param name="replacer">A lambda which takes the current key and value for an entry, and returns the new value.</param> - [Obsolete("Access " + nameof(AssetData<IDictionary<TKey, TValue>>.Data) + "field directly.")] - public void Set(Func<TKey, TValue, TValue> replacer) - { - SCore.DeprecationManager.Warn($"AssetDataForDictionary.{nameof(Set)}", "2.10", DeprecationLevel.PendingRemoval); - foreach (var pair in this.Data.ToArray()) - this.Data[pair.Key] = replacer(pair.Key, pair.Value); - } -#endif } } |