Table of Contents

Method TryParseFrom

Namespace
Ubiquity.NET.Versioning
Assembly
Ubiquity.NET.Versioning.dll

TryParseFrom(IReadOnlyList<string>)

Tries to parse a PrereleaseVersion from a set of pre release parts from a version string

public static IResult<PrereleaseVersion> TryParseFrom(IReadOnlyList<string> preRelParts)

Parameters

preRelParts IReadOnlyList<string>

Parts of the prerelease components to convert to a CSemVer(-CI) pre-release version

Returns

IResult<PrereleaseVersion>

Result of the parse.

Remarks

The preRelParts must only contain the relevant parts of a pre-release version for CSemVer(-CI). Therefore it must contain at least one entry for the name, and optionally up to two additional entries for the number and fix values. If present, the number and fix values must parse to an integer in the range 0-99 using the InvariantCulture.