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.

54 lines
1.4 KiB

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