using System; using Version = SemVer.Version; // ReSharper disable CheckNamespace namespace IPA { /// /// A class to provide information about a mod on ModSaber.ML /// // ReSharper disable once IdentifierTypo public class ModsaberModInfo { /// /// The name the mod uses on ModSaber as an identifier. /// public string InternalName { get => _internalName; set { if (_internalName == null) { _internalName = value; } else { throw new Exception("Cannot change name one it has been set!"); } } } private string _internalName; /// /// The version of the currently installed mod. Used to compare to the version on ModSaber. Should be a valid SemVer version. /// public string CurrentVersion { get => _currentVersion; set { if (_currentVersion == null) { var version = new Version(value); // check for valid version _currentVersion = value; SemverVersion = version; } else { throw new Exception("Cannot change version one it has been set!"); } } } private string _currentVersion; internal Version SemverVersion; } }