Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

43 rindas
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. }