diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-10-14 11:44:02 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-10-14 11:44:02 -0400 |
commit | 79118316065a01322d8ea12a14589ec016794c32 (patch) | |
tree | 7a26668a66ea0630a2b9367ac820fe7a6d99ac77 /src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs | |
parent | af1a2bde8219c5d4b8660b13702725626a4a5647 (diff) | |
parent | 8aec1eff99858716afe7b8604b512181f78c214f (diff) | |
download | SMAPI-79118316065a01322d8ea12a14589ec016794c32.tar.gz SMAPI-79118316065a01322d8ea12a14589ec016794c32.tar.bz2 SMAPI-79118316065a01322d8ea12a14589ec016794c32.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs')
-rw-r--r-- | src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs b/src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs deleted file mode 100644 index ab590e10..00000000 --- a/src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs +++ /dev/null @@ -1,68 +0,0 @@ -using StardewModdingAPI.Framework.Models; - -namespace StardewModdingAPI.Framework.ModLoading -{ - /// <summary>Metadata for a mod.</summary> - internal class ModMetadata : IModMetadata - { - /********* - ** Accessors - *********/ - /// <summary>The mod's display name.</summary> - public string DisplayName { get; } - - /// <summary>The mod's full directory path.</summary> - public string DirectoryPath { get; } - - /// <summary>The mod manifest.</summary> - public IManifest Manifest { get; } - - /// <summary>Optional metadata about a mod version that SMAPI should assume is compatible or broken, regardless of whether it detects incompatible code.</summary> - public ModCompatibility Compatibility { get; } - - /// <summary>The metadata resolution status.</summary> - public ModMetadataStatus Status { get; private set; } - - /// <summary>The reason the metadata is invalid, if any.</summary> - public string Error { get; private set; } - - /// <summary>The mod instance (if it was loaded).</summary> - public IMod Mod { get; private set; } - - - /********* - ** Public methods - *********/ - /// <summary>Construct an instance.</summary> - /// <param name="displayName">The mod's display name.</param> - /// <param name="directoryPath">The mod's full directory path.</param> - /// <param name="manifest">The mod manifest.</param> - /// <param name="compatibility">Optional metadata about a mod version that SMAPI should assume is compatible or broken, regardless of whether it detects incompatible code.</param> - public ModMetadata(string displayName, string directoryPath, IManifest manifest, ModCompatibility compatibility) - { - this.DisplayName = displayName; - this.DirectoryPath = directoryPath; - this.Manifest = manifest; - this.Compatibility = compatibility; - } - - /// <summary>Set the mod status.</summary> - /// <param name="status">The metadata resolution status.</param> - /// <param name="error">The reason the metadata is invalid, if any.</param> - /// <returns>Return the instance for chaining.</returns> - public IModMetadata SetStatus(ModMetadataStatus status, string error = null) - { - this.Status = status; - this.Error = error; - return this; - } - - /// <summary>Set the mod instance.</summary> - /// <param name="mod">The mod instance to set.</param> - public IModMetadata SetMod(IMod mod) - { - this.Mod = mod; - return this; - } - } -} |