TJC.VersionExtensions
0.2.1
See the version list below for details.
dotnet add package TJC.VersionExtensions --version 0.2.1
NuGet\Install-Package TJC.VersionExtensions -Version 0.2.1
<PackageReference Include="TJC.VersionExtensions" Version="0.2.1" />
paket add TJC.VersionExtensions --version 0.2.1
#r "nuget: TJC.VersionExtensions, 0.2.1"
// Install TJC.VersionExtensions as a Cake Addin #addin nuget:?package=TJC.VersionExtensions&version=0.2.1 // Install TJC.VersionExtensions as a Cake Tool #tool nuget:?package=TJC.VersionExtensions&version=0.2.1
<a href="https://github.com/TJC-Tools/TJC.VersionExtensions/tags"> <img alt="GitHub Tag" src="https://img.shields.io/github/v/tag/TJC-Tools/TJC.VersionExtensions?style=for-the-badge&logo=tag&logoColor=white&labelColor=24292f&color=blue" /> </a>
<a href="https://github.com/TJC-Tools/TJC.VersionExtensions/releases/latest"> <img alt="GitHub Release" src="https://img.shields.io/github/v/release/TJC-Tools/TJC.VersionExtensions?style=for-the-badge&logo=starship&logoColor=D9E0EE&labelColor=302D41&&color=green&include_prerelease&sort=semver" /> </a>
<a href="https://www.nuget.org/packages/TJC.VersionExtensions"> <img alt="NuGet Version" src="https://img.shields.io/nuget/v/TJC.VersionExtensions?style=for-the-badge&logo=nuget&logoColor=white&labelColor=004880&color=blue" /> </a>
<br/>
<a href="https://www.nuget.org/packages/TJC.VersionExtensions"> <img alt="NuGet Downloads" src="https://img.shields.io/nuget/dt/TJC.VersionExtensions?style=for-the-badge&logo=nuget&logoColor=white&labelColor=004880&color=yellow" /> </a>
<a href="https://github.com/TJC-Tools/TJC.VersionExtensions"> <img alt="Repository Size" src="https://img.shields.io/github/repo-size/TJC-Tools/TJC.VersionExtensions?style=for-the-badge&logo=files&logoColor=white&labelColor=24292f&color=orange" /> </a>
<br/>
<a href="https://www.nuget.org/packages/TJC.VersionExtensions"> <img alt="Last commit" src="https://img.shields.io/github/last-commit/TJC-Tools/TJC.VersionExtensions?style=for-the-badge&logo=git&logoColor=D9E0EE&labelColor=302D41&color=mediumpurple"/> </a>
<a href="LICENSE"> <img alt="License" src="https://img.shields.io/github/license/TJC-Tools/TJC.VersionExtensions.svg?style=for-the-badge&logo=balance-scale&logoColor=white&labelColor=333333&color=blueviolet" /> </a>
Table of Contents
Increments
Version.Increment(VersionComponents)
- Returns a new Version with the specified component incremented by 1, and the following components reset to 0
Version.IncrementMajor()
- Returns a new Version with the major component incremented by 1, and the rest reset to 0
var version = new Version(1, 2, 3, 4);
var incrementedVersion = version.IncrementMajor();
// incrementedVersion == new Version(2, 0, 0, 0)
Version.IncrementMinor()
- Returns a new Version with the minor component incremented by 1, and the build & revision reset to 0
var version = new Version(1, 2, 3, 4);
var incrementedVersion = version.IncrementMinor();
// incrementedVersion == new Version(1, 3, 0, 0)
Version.IncrementBuild()
- Returns a new Version with the build component incremented by 1, and the revision reset to 0
var version = new Version(1, 2, 3, 4);
var incrementedVersion = version.IncrementBuild();
// incrementedVersion == new Version(1, 2, 4, 0)
Version.IncrementRevision()
- Returns a new Version with the revision component incremented by 1
var version = new Version(1, 2, 3, 4);
var incrementedVersion = version.IncrementRevision();
// incrementedVersion == new Version(1, 2, 3, 5)
Comparisons
Version.Equivalent(Version)
- Returns
true
if the components are equivalent (if undefined, they are considered equivalent to0
),false
otherwise
var version = new Version(1, 0, 0, 0);
var other = new Version(1);
var result = version.Equivalent(other);
// result == true
Version.IsZero()
- Returns
true
if the components are equivalent (if undefined, they are considered equivalent to0
),false
otherwise
var zero = new Version(0, 0, 0, 0);
var undefined = new Version();
var result1 = zero.IsZero();
var result2 = undefined.IsZero();
// result1 == true
// result2 == true
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- TJC.Singleton (>= 0.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.4.3 | 80 | 11/15/2024 |
0.4.2 | 73 | 11/10/2024 |
0.4.1 | 72 | 11/5/2024 |
0.4.0 | 71 | 11/5/2024 |
0.3.1 | 82 | 10/26/2024 |
0.3.0 | 85 | 10/20/2024 |
0.2.2 | 97 | 10/20/2024 |
0.2.1 | 82 | 10/16/2024 |
0.2.0 | 83 | 10/10/2024 |
0.1.7 | 95 | 9/29/2024 |
0.1.6 | 99 | 9/5/2024 |
0.1.5 | 85 | 9/5/2024 |
0.1.4 | 89 | 9/4/2024 |
0.1.3 | 89 | 9/3/2024 |
0.1.2 | 97 | 7/20/2024 |
0.1.1 | 118 | 7/20/2024 |
0.1.0 | 93 | 7/20/2024 |