Skip to content

Latest commit

 

History

History
189 lines (180 loc) · 6.11 KB

Atc.Data.SemVer.md

File metadata and controls

189 lines (180 loc) · 6.11 KB

Atc.Data.SemVer


SemanticVersion

Represents a version object, compliant with the Semantic Version standard 2.0 (http://semver.org).

public class SemanticVersion : IComparable, IComparable<SemanticVersion>, IEquatable<SemanticVersion>

Static Methods

Parse

SemanticVersion Parse(string input, bool looseMode = False)

Summary: Construct a new semantic version from a version string.

Parameters:
     input  -  The version string.
     looseMode  -  When true, be more forgiving of some invalid version specifications.

Returns: The SemanticVersion

TryParse

bool TryParse(string input, out SemanticVersion result)

Summary: Try to construct a new semantic version from a version string.

Parameters:
     input  -  The version string.
     result  -  The Version, or null when parse fails.

Returns: A boolean indicating success of the parse operation.

TryParse

bool TryParse(string input, bool looseMode, out SemanticVersion result)

Summary: Try to construct a new semantic version from a version string.

Parameters:
     input  -  The version string.
     result  -  The Version, or null when parse fails.

Returns: A boolean indicating success of the parse operation.

Properties

Build

Build

Summary: The build string, or null for no build version.

IsPreRelease

IsPreRelease

Summary: Whether this version is a pre-release.

IsStrictMode

IsStrictMode

Summary: Whether this version is a strict SemVer2.0.

Major

Major

Summary: The major part of the version.

Remarks: Increment the major version part - when you make incompatible API changes.

Minor

Minor

Summary: The minor part of the version.uu

Remarks: Increment the minor version part - when you add functionality in a backwards compatible manner.

Patch

Patch

Summary: The patch part of the version.

Remarks: Increment the patch version part - when you make backwards compatible bug fixes.

PreRelease

PreRelease

Summary: The pre-release string, or null for no pre-release version.

Methods

BaseVersion

SemanticVersion BaseVersion()

Summary: Returns this version without any pre-release or build version.

Returns: The base version

CompareTo

int CompareTo(object obj)

Summary: Compares two versions are semantically.

Parameters:
     obj  -  The other.

CompareTo

int CompareTo(SemanticVersion other)

Summary: Compares two versions are semantically.

Parameters:
     obj  -  The other.

CompareTo

int CompareTo(SemanticVersion otherVersion, int significantParts, int startingPart, bool looseMode = False)

Summary: Compares two versions are semantically.

Parameters:
     obj  -  The other.

Equals

bool Equals(SemanticVersion other)

Summary: Test whether two versions are semantically equivalent.

Parameters:
     other  -  The other.

Equals

bool Equals(object obj)

Summary: Test whether two versions are semantically equivalent.

Parameters:
     other  -  The other.

GetHashCode

int GetHashCode()

Summary: Calculate a hash code for the version.

GreaterThan

bool GreaterThan(SemanticVersion otherVersion, int significantParts = 4, int startingPart = 1, bool looseMode = False)

Summary: Greater than.

Parameters:
     otherVersion  -  The other version.
     significantParts  -  The significant parts.
     startingPart  -  The starting part.
     looseMode  -  if set to true [loose mode].

GreaterThanOrEqualTo

bool GreaterThanOrEqualTo(SemanticVersion otherVersion, int significantParts = 4, int startingPart = 1)

Summary: Greater than or equal.

Parameters:
     otherVersion  -  The other version.
     significantParts  -  The significant parts.
     startingPart  -  The starting part.

IsNewerThan

bool IsNewerThan(SemanticVersion otherVersion, bool withinMinorReleaseOnly = False, bool looseMode = False)

Summary: Is newer than.

Parameters:
     otherVersion  -  The other version.
     withinMinorReleaseOnly  -  if set to true [within minor release only].
     looseMode  -  if set to true [loose mode].

ToString

string ToString()

ToVersion

Version ToVersion()

Summary: Converts to System.Version based on Major, Minor and Patch.


Generated by MarkdownCodeDoc version 1.2