No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

BuildVersion.cs 961 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. }