Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Parse/TryParse methods to MinVerVersion #9

Merged
merged 1 commit into from
Nov 27, 2020

Conversation

augustoproiete
Copy link
Member

var buildVersion = MinVerVersion.Parse("1.2.3-preview.0.8+abcd")

Information($"Version: {buildVersion.Version}");
Information($"Major: {buildVersion.Major}");
Information($"Minor: {buildVersion.Minor}");
Information($"Patch: {buildVersion.Patch}");
Information($"PreRelease: {buildVersion.PreRelease}");
Information($"BuildMetadata: {buildVersion.BuildMetadata}");
if (MinVerVersion.TryParse("1.2.3-preview.0.8+abcd", out var buildVersion))
{
    Information($"Version: {buildVersion.Version}");
    Information($"Major: {buildVersion.Major}");
    Information($"Minor: {buildVersion.Minor}");
    Information($"Patch: {buildVersion.Patch}");
    Information($"PreRelease: {buildVersion.PreRelease}");
    Information($"BuildMetadata: {buildVersion.BuildMetadata}");
}

@augustoproiete augustoproiete added the enhancement New feature or request label Nov 27, 2020
@augustoproiete augustoproiete added this to the 0.2.0 milestone Nov 27, 2020
@augustoproiete augustoproiete merged commit 174bf20 into master Nov 27, 2020
@augustoproiete augustoproiete deleted the minver-parse-try-parse branch November 27, 2020 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant