Skip to content

Commit

Permalink
Add dotnet version supportability metrics for net5 (#455)
Browse files Browse the repository at this point in the history
* Add dotnet version supportability metrics for net5

* added netcoreapp3.1 supportability metrics.
  • Loading branch information
vuqtran88 authored Feb 9, 2021
1 parent 45b6cdf commit 48e4cfd
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/NewRelic.Core/DotnetVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public enum DotnetCoreVersion
{
LessThan30,
netcoreapp30,
GreaterThan30
netcoreapp31,
net5,
Other,
}

public static class DotnetVersion
Expand Down Expand Up @@ -87,12 +89,22 @@ public static DotnetCoreVersion GetDotnetCoreVersion()
return DotnetCoreVersion.netcoreapp30;
}

if (envVer.Major == 3 && envVer.Minor == 1)
{
return DotnetCoreVersion.netcoreapp31;
}

if (envVer.Major == 5)
{
return DotnetCoreVersion.net5;
}

if (envVer.Major == 4)
{
return DotnetCoreVersion.LessThan30;
}

return DotnetCoreVersion.GreaterThan30;
return DotnetCoreVersion.Other;
}
#endif
}
Expand Down

0 comments on commit 48e4cfd

Please sign in to comment.