diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-22 14:38:57 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-22 14:38:57 -0400 |
commit | 2ab2182645179129997eac3fccb63f6f0683dbe1 (patch) | |
tree | ddea4c6e4531a10c698d9757a57ae24c6732bff7 /src/SMAPI/Framework/ContentManagers/IContentManager.cs | |
parent | 5731b015a0c548ac72e0d7ce9c4153aa52da3562 (diff) | |
parent | 336cc1cc0f250c96ee23d45e1e08569b67a2e562 (diff) | |
download | SMAPI-2ab2182645179129997eac3fccb63f6f0683dbe1.tar.gz SMAPI-2ab2182645179129997eac3fccb63f6f0683dbe1.tar.bz2 SMAPI-2ab2182645179129997eac3fccb63f6f0683dbe1.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/ContentManagers/IContentManager.cs')
-rw-r--r-- | src/SMAPI/Framework/ContentManagers/IContentManager.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/ContentManagers/IContentManager.cs b/src/SMAPI/Framework/ContentManagers/IContentManager.cs index ac67cad5..f2e3b9f0 100644 --- a/src/SMAPI/Framework/ContentManagers/IContentManager.cs +++ b/src/SMAPI/Framework/ContentManagers/IContentManager.cs @@ -32,7 +32,7 @@ namespace StardewModdingAPI.Framework.ContentManagers /// <typeparam name="T">The expected asset type.</typeparam> /// <param name="assetName">The normalized asset name.</param> bool DoesAssetExist<T>(IAssetName assetName) - where T: notnull; + where T : notnull; /// <summary>Load an asset through the content pipeline, using a localized variant of the <paramref name="assetName"/> if available.</summary> /// <typeparam name="T">The type of asset to load.</typeparam> @@ -65,10 +65,13 @@ namespace StardewModdingAPI.Framework.ContentManagers /// <param name="assetName">The asset path relative to the loader root directory, not including the <c>.xnb</c> extension.</param> bool IsLoaded(IAssetName assetName); + /// <summary>Get all assets in the cache.</summary> + IEnumerable<KeyValuePair<string, object>> GetCachedAssets(); + /// <summary>Purge matched assets from the cache.</summary> - /// <param name="predicate">Matches the asset keys to invalidate.</param> + /// <param name="assetName">The asset name to dispose.</param> /// <param name="dispose">Whether to dispose invalidated assets. This should only be <c>true</c> when they're being invalidated as part of a dispose, to avoid crashing the game.</param> - /// <returns>Returns the invalidated asset names and instances.</returns> - IDictionary<string, object> InvalidateCache(Func<string, Type, bool> predicate, bool dispose = false); + /// <returns>Returns whether the asset was in the cache.</returns> + bool InvalidateCache(IAssetName assetName, bool dispose = false); } } |