Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add BuilderVersion class and replace NdapiContext.ProductVersio…
…n by NdapiContext.BuilderVersion
- Loading branch information
Showing
3 changed files
with
39 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
|
||
namespace Ndapi.Enums; | ||
|
||
public record BuilderVersion(int FullVersion) | ||
{ | ||
public Version Version { get; } = | ||
new(FullVersion / 10_000_000, (FullVersion / 1_000_000) % 10, (FullVersion / 10_000) % 100, | ||
(FullVersion / 100) % 100); | ||
|
||
public int MajorVersion => Version.Major; | ||
|
||
public static BuilderVersion Forms6 { get; } = new(60000000); | ||
public static BuilderVersion Forms12213 { get; } = new(122010300); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters