Class VersionProp
Properties for version of package
Inheritance
Implements
Namespace: BuildSystem.Package
Assembly: BuildSystem.ManagerObject.Interfaces.dll
Syntax
public class VersionProp : Object, IComparable<VersionProp>
Constructors
VersionProp()
Properties for version of package
Declaration
public VersionProp()
VersionProp(VersionProp)
Properties for version of package
Declaration
public VersionProp(VersionProp source)
Parameters
Type | Name | Description |
---|---|---|
VersionProp | source |
VersionProp(string, string?)
Properties for version of package
Declaration
public VersionProp(string version, string? metadata = null)
Parameters
Type | Name | Description |
---|---|---|
string | version | |
string | metadata |
Properties
FullString
Returns the full version string with metadata
Declaration
public string FullString { get; }
Property Value
Type | Description |
---|---|
string |
Major
X.o.o-ooo.o
Declaration
public string? Major { get; set; }
Property Value
Type | Description |
---|---|
string |
Metadata
o.o.o-ooo.o+METADATA
Declaration
public string? Metadata { get; set; }
Property Value
Type | Description |
---|---|
string |
Minor
o.X.o-ooo.o
Declaration
public string? Minor { get; set; }
Property Value
Type | Description |
---|---|
string |
Patch
o.o.X-ooo.o
Declaration
public string? Patch { get; set; }
Property Value
Type | Description |
---|---|
string |
ReleaseLabel
o.o.o-XXX.o
Declaration
public string? ReleaseLabel { get; set; }
Property Value
Type | Description |
---|---|
string |
ReleaseNum
o.o.o-ooo.X
Declaration
public string? ReleaseNum { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
CompareTo(VersionProp?)
Compare this version with another one and return result of comparision
Declaration
public int CompareTo(VersionProp? target)
Parameters
Type | Name | Description |
---|---|---|
VersionProp | target | Version to compare with |
Returns
Type | Description |
---|---|
int | Result of comparision |
Copy(VersionProp)
Copy all properties from source version
Declaration
public void Copy(VersionProp source)
Parameters
Type | Name | Description |
---|---|---|
VersionProp | source |
EmptyValues()
Return values of properties to null
Declaration
public void EmptyValues()
Equals(object?)
Comparision of this version and another one
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj |
Returns
Type | Description |
---|---|
bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
GetMask()
String representation of version, but null values replaced by "*"
Declaration
public string GetMask()
Returns
Type | Description |
---|---|
string |
IsMask(VersionProp)
Providing version contains null values or "*" values
Declaration
public static bool IsMask(VersionProp version)
Parameters
Type | Name | Description |
---|---|---|
VersionProp | version |
Returns
Type | Description |
---|---|
bool |
IsMatch(VersionProp)
Check if current version value is suitable for mask
Declaration
public bool IsMatch(VersionProp mask)
Parameters
Type | Name | Description |
---|---|---|
VersionProp | mask | Mask to compare with |
Returns
Type | Description |
---|---|
bool |
ToString()
String representation of version
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Update(string, string?)
Read string value into self properties
Declaration
public void Update(string value, string? metadata)
Parameters
Type | Name | Description |
---|---|---|
string | value | String representation of version |
string | metadata | String representation of version metadata |
Update(JsonNode?)
Update internal properties - read them from JsonObject
Declaration
public void Update(JsonNode? jsonNode)
Parameters
Type | Name | Description |
---|---|---|
System.Text.Json.Nodes.JsonNode | jsonNode | JsonObject with parameters for package |