You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.4 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. using System;
  2. // ReSharper disable CheckNamespace
  3. namespace IPA
  4. {
  5. /// <summary>
  6. /// A class to provide information about a mod on ModSaber.ML
  7. /// </summary>
  8. // ReSharper disable once IdentifierTypo
  9. public class ModsaberModInfo
  10. {
  11. /// <summary>
  12. /// The name the mod uses on ModSaber as an identifier.
  13. /// </summary>
  14. public string InternalName
  15. {
  16. get => _internalName;
  17. set
  18. {
  19. if (_internalName == null)
  20. {
  21. _internalName = value;
  22. }
  23. else
  24. {
  25. throw new Exception("Cannot change name one it has been set!");
  26. }
  27. }
  28. }
  29. private string _internalName;
  30. /// <summary>
  31. /// The version of the currently installed mod. Used to compare to the version on ModSaber. Should be a valid SemVer version.
  32. /// </summary>
  33. public string CurrentVersion
  34. {
  35. get => _currentVersion;
  36. set
  37. {
  38. if (_currentVersion == null)
  39. {
  40. _currentVersion = value;
  41. }
  42. else
  43. {
  44. throw new Exception("Cannot change version one it has been set!");
  45. }
  46. }
  47. }
  48. private string _currentVersion;
  49. }
  50. }