ToString() public method

Returns the version string.
This method includes legacy behavior. Use ToNormalizedString() instead.
public ToString ( ) : string
return string
Ejemplo n.º 1
0
        public static SemanticVersion ApplyMask(string mask, SemanticVersion currentVersion)
        {
            var match = FormatRegex.Match(mask);
            if (!match.Success)
                return SemanticVersion.Parse(mask);

            return currentVersion == null
                ? GenerateVersionFromMask(new MaskMatchedVersion(mask))
                : GenerateVersionFromCurrent(new MaskMatchedVersion(mask), new MaskMatchedVersion(currentVersion.ToString()));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a NuGetVersion from an existing NuGetVersion
 /// </summary>
 public SemanticVersion(SemanticVersion version)
     : this(version.Version, version.ReleaseLabels, version.Metadata, version.ToString())
 {
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a NuGetVersion from an existing NuGetVersion
 /// </summary>
 public SemanticVersion(SemanticVersion version)
     : this(version.Version, version.ReleaseLabels, version.Metadata, version.ToString())
 {
 }
Ejemplo n.º 4
0
        public static SemanticVersion ApplyMask(string mask, SemanticVersion currentVersion)
        {
            var match = FormatRegex.Match(mask);

            if (!match.Success)
            {
                return(SemanticVersion.Parse(mask));
            }

            return(currentVersion == null
                ? GenerateVersionFromMask(new MaskMatchedVersion(mask))
                : GenerateVersionFromCurrent(new MaskMatchedVersion(mask), new MaskMatchedVersion(currentVersion.ToString())));
        }