public static SemanticVersion Parse(string value, bool preserveMissingComponents = false)
{
if (String.IsNullOrEmpty(value))
{
throw new ArgumentException("Value cannot be null or an empty string", nameof(value));
}
SemanticVersion ver = null;
if (!TryParse(value, out ver, preserveMissingComponents))
{
throw new ArgumentException($"'{value}' is not a valid version string", nameof(value));
}
return ver;
}