public VersionMetadata(string metadataString) { string[] parts; if (!VersionHelpers.TryParseVersionSuffix(metadataString, out parts)) { throw new ArgumentException($"Invalid metadata. String '{metadataString}', does not match requirements"); } this.metadataString = metadataString; Parts = parts; }
public PreReleaseIdentifier(string identifierString) { string[] parts; if (!VersionHelpers.TryParseVersionSuffix(identifierString, out parts)) { throw new ArgumentException($"Invalid prerelease identifier. String '{identifierString}', does not match requirements"); } this.identifierString = identifierString; Parts = parts; }