using System; using System.Collections.Generic; using StardewModdingAPI.Framework.Content; namespace StardewModdingAPI { /// Encapsulates access and changes to dictionary content being read from a data file. public interface IAssetDataForDictionary : IAssetData> { #if !SMAPI_3_0_STRICT /********* ** Public methods *********/ /// Add or replace an entry in the dictionary. /// The entry key. /// The entry value. [Obsolete("Access " + nameof(AssetData>.Data) + "field directly.")] void Set(TKey key, TValue value); /// Add or replace an entry in the dictionary. /// The entry key. /// A callback which accepts the current value and returns the new value. [Obsolete("Access " + nameof(AssetData>.Data) + "field directly.")] void Set(TKey key, Func value); /// Dynamically replace values in the dictionary. /// A lambda which takes the current key and value for an entry, and returns the new value. [Obsolete("Access " + nameof(AssetData>.Data) + "field directly.")] void Set(Func replacer); #endif } }