Beamable SDK
Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
Beamable.Common.PackageVersion Class Reference

Public Member Functions

 PackageVersion (int major, int minor, int patch, int rc=-1, long nightlyTime=-1, bool isPreview=false)
 
override bool Equals (object obj)
 Check if the given object is a semantic match of this package version. More...
 
override int GetHashCode ()
 
bool IsMinor (int major, int minor)
 
bool IsMajor (int major)
 
override string ToString ()
 Convert the package version into a semantic package string. More...
 

Static Public Member Functions

static bool operator< (PackageVersion a, PackageVersion b)
 
static bool operator> (PackageVersion b, PackageVersion a)
 
static bool operator== (PackageVersion a, PackageVersion b)
 
static bool operator!= (PackageVersion a, PackageVersion b)
 
static bool operator<= (PackageVersion a, PackageVersion b)
 
static bool operator>= (PackageVersion a, PackageVersion b)
 
static implicit operator PackageVersion (string versionString)
 
static bool TryFromSemanticVersionString (string semanticVersion, out PackageVersion version)
 Try to parse a string into a PackageVersion More...
 
static PackageVersion FromSemanticVersionString (string semanticVersion)
 Parse a string into a PackageVersion More...
 

Protected Member Functions

bool Equals (PackageVersion other)
 

Properties

bool IsReleaseCandidate [get]
 True if this package version is representing a release candidate version.
 
bool IsNightly [get]
 True if this package version is representing a nightly version
 
bool IsPreview [get]
 True if this package version is representing a preview build.
 
int Major [get]
 The major version is the first number in the semantic version string. In the example, "1.2.3", the major version is 1.
 
int Minor [get]
 The minor version is the second number in the semantic version string. In the example, "1.2.3", the minor version is 2.
 
int Patch [get]
 The patch version is the last number in the semantic version string. In the example, "1.2.3", the patch version is 3.
 
long? NightlyTime [get]
 If this is a nightly package, see IsNightly, this will represent the date time when the build was created
 
int? RC [get]
 If this is a release candidate package, see IsReleaseCandidate, this will represent the number of the release candidate.
 

Member Function Documentation

◆ Equals()

override bool Beamable.Common.PackageVersion.Equals ( object  obj)
inline

Check if the given object is a semantic match of this package version.

Parameters
obj
Returns
True if the given object is the same semantic package version as this instance.

◆ FromSemanticVersionString()

static PackageVersion Beamable.Common.PackageVersion.FromSemanticVersionString ( string  semanticVersion)
inlinestatic

Parse a string into a PackageVersion

Parameters
semanticVersionsome semantic version string
Returns
A PackageVersion
Exceptions
ArgumentExceptionIf the string was not a valid semantic version string

◆ ToString()

override string Beamable.Common.PackageVersion.ToString ( )
inline

Convert the package version into a semantic package string.

Returns
A semantic version string

◆ TryFromSemanticVersionString()

static bool Beamable.Common.PackageVersion.TryFromSemanticVersionString ( string  semanticVersion,
out PackageVersion  version 
)
inlinestatic

Try to parse a string into a PackageVersion

Parameters
semanticVersionsome semantic string
versionThis value will be assigned to the parsed value of the semantic string, or will be null if the string wasn't a valid semantic version string
Returns
True if the given string was a valid semantic version; false otherwise.

The documentation for this class was generated from the following file: