diff options
| author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-10-07 23:20:36 -0400 |
|---|---|---|
| committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-10-07 23:20:36 -0400 |
| commit | d0dd2f7ba729de6be749d326a2fed78988ba9d7b (patch) | |
| tree | a22127da6a8900e9f29bbb847bfd5d3347f6b952 /src/StardewModdingAPI/IAssetData.cs | |
| parent | 7889676ea24cafc945899bf25608784e3f5bc9e0 (diff) | |
| parent | 5928f5f86c4493ddb6b89bce0b7d0fb73a884c09 (diff) | |
| download | SMAPI-d0dd2f7ba729de6be749d326a2fed78988ba9d7b.tar.gz SMAPI-d0dd2f7ba729de6be749d326a2fed78988ba9d7b.tar.bz2 SMAPI-d0dd2f7ba729de6be749d326a2fed78988ba9d7b.zip | |
Merge branch 'add-mod-build-config' into develop
Diffstat (limited to 'src/StardewModdingAPI/IAssetData.cs')
| -rw-r--r-- | src/StardewModdingAPI/IAssetData.cs | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/StardewModdingAPI/IAssetData.cs b/src/StardewModdingAPI/IAssetData.cs deleted file mode 100644 index c3021144..00000000 --- a/src/StardewModdingAPI/IAssetData.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; - -namespace StardewModdingAPI -{ - /// <summary>Generic metadata and methods for a content asset being loaded.</summary> - /// <typeparam name="TValue">The expected data type.</typeparam> - public interface IAssetData<TValue> : IAssetInfo - { - /********* - ** Accessors - *********/ - /// <summary>The content data being read.</summary> - TValue Data { get; } - - - /********* - ** Public methods - *********/ - /// <summary>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.</summary> - /// <param name="value">The new content value.</param> - /// <exception cref="ArgumentNullException">The <paramref name="value"/> is null.</exception> - /// <exception cref="InvalidCastException">The <paramref name="value"/>'s type is not compatible with the loaded asset's type.</exception> - void ReplaceWith(TValue value); - } - - /// <summary>Generic metadata and methods for a content asset being loaded.</summary> - public interface IAssetData : IAssetData<object> - { - /********* - ** Public methods - *********/ - /// <summary>Get a helper to manipulate the data as a dictionary.</summary> - /// <typeparam name="TKey">The expected dictionary key.</typeparam> - /// <typeparam name="TValue">The expected dictionary value.</typeparam> - /// <exception cref="InvalidOperationException">The content being read isn't a dictionary.</exception> - IAssetDataForDictionary<TKey, TValue> AsDictionary<TKey, TValue>(); - - /// <summary>Get a helper to manipulate the data as an image.</summary> - /// <exception cref="InvalidOperationException">The content being read isn't an image.</exception> - IAssetDataForImage AsImage(); - - /// <summary>Get the data as a given type.</summary> - /// <typeparam name="TData">The expected data type.</typeparam> - /// <exception cref="InvalidCastException">The data can't be converted to <typeparamref name="TData"/>.</exception> - TData GetData<TData>(); - } -} |
