|
1234567891011121314151617181920212223242526272829303132333435363738 |
- namespace BuildScript
- {
- public class BuildVersion
- {
- public BuildVersion(int major, int minor, int patch, string quality)
- {
- Major = major;
- Minor = minor;
- Patch = patch;
- Quality = quality;
- }
-
- public int Major { get; set; }
-
- public int Minor { get; set; }
-
- public int Patch { get; set; }
-
- public string Quality { get; set; }
-
- public string Suffix { get; set; }
-
- public string VersionWithoutQuality()
- {
- return $"{Major}.{Minor}.{Patch}";
- }
-
- public string Version()
- {
- return VersionWithoutQuality() + (Quality == null ? string.Empty : $"-{Quality}");
- }
-
- public string VersionWithSuffix()
- {
- return Version() + (Suffix == null ? string.Empty : $"-{Suffix}");
- }
- }
- }
|