using System;
using System.Collections.Generic;
namespace StardewModdingAPI
{
/// Encapsulates access and changes to dictionary content being read from a data file.
public interface IContentEventHelperForDictionary
{
/*********
** Accessors
*********/
/// The content's locale code, if the content is localised.
string Locale { get; }
/// The normalised asset name being read. The format may change between platforms; see to compare with a known path.
string AssetName { get; }
/// The content data being read.
IDictionary Data { get; }
/*********
** Public methods
*********/
/// Get whether the asset name being loaded matches a given name after normalisation.
/// The expected asset path, relative to the game's content folder and without the .xnb extension or locale suffix (like 'Data\ObjectInformation').
bool IsAssetName(string path);
/// Add or replace an entry in the dictionary data.
/// The entry key.
/// The entry value.
void SetEntry(TKey key, TValue value);
/// Add or replace an entry in the dictionary data.
/// The entry key.
/// A callback which accepts the current value and returns the new value.
void SetEntry(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.
void Replace(Func replacer);
/// Replace the entire content value with the given value. This is generally not recommended, since it may break compatibility with other mods or different versions of the game.
/// The new content value.
/// The is null.
void ReplaceWith(IDictionary value);
}
}