using System.Collections.Generic;
namespace StardewModdingAPI
{
/// Provides an API for fetching metadata about loaded mods.
public interface IModRegistry : IModLinked
{
/// Get metadata for all loaded mods.
IEnumerable GetAll();
/// Get metadata for a loaded mod.
/// The mod's unique ID.
/// Returns the matching mod's metadata, or null if not found.
IManifest Get(string uniqueID);
/// Get whether a mod has been loaded.
/// The mod's unique ID.
bool IsLoaded(string uniqueID);
/// Get the API provided by a mod, or null if it has none. This signature requires using the API to access the API's properties and methods.
/// The mod's unique ID.
object GetApi(string uniqueID);
/// Get the API provided by a mod, mapped to a given interface which specifies the expected properties and methods. If the mod has no API or it's not compatible with the given interface, get null.
/// The interface which matches the properties and methods you intend to access.
/// The mod's unique ID.
TInterface GetApi(string uniqueID) where TInterface : class;
}
}