您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

43 行
961 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace BuildScript
  5. {
  6. public class BuildVersion
  7. {
  8. public BuildVersion(int major, int minor, int patch, string quality)
  9. {
  10. Major = major;
  11. Minor = minor;
  12. Patch = patch;
  13. Quality = quality;
  14. }
  15. public int Major { get; set; }
  16. public int Minor { get; set; }
  17. public int Patch { get; set; }
  18. public string Quality { get; set; }
  19. public string Suffix { get; set; }
  20. public string VersionWithoutQuality()
  21. {
  22. return $"{Major}.{Minor}.{Patch}";
  23. }
  24. public string Version()
  25. {
  26. return VersionWithoutQuality() + (Quality == null ? string.Empty : $"-{Quality}");
  27. }
  28. public string VersionWithSuffix()
  29. {
  30. return Version() + (Suffix == null ? string.Empty : $"-{Suffix}");
  31. }
  32. }
  33. }