-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Framework and runtime info #526
Conversation
* Removed unused nuget function
* Removed unused nuget function
Build on Linux and macOS - run on travis
* Runtime has FrameworkInstallation when compiled to NETFX * Sample app outputs calls in different targets * Run sample on Mono * Execute flag on run.sh * Add sample output to Console readme
…r FrameworkInfo on netstandard targets.
feat: Mappings for .NET Framework 4.8
ref: project improvements
.NET Framework 4.8 patches
release: 1.1.1
Codecov Report
@@ Coverage Diff @@
## main #526 +/- ##
===========================================
+ Coverage 60.30% 86.01% +25.71%
===========================================
Files 112 126 +14
Lines 2660 3168 +508
Branches 601 726 +125
===========================================
+ Hits 1604 2725 +1121
+ Misses 875 249 -626
- Partials 181 194 +13
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, some small comments.
FrameworkInstallation latest = null; | ||
foreach (var installation in GetInstallations()) | ||
{ | ||
if (latest == null) | ||
{ | ||
latest = installation; | ||
} | ||
|
||
if (clrVersion == 2) | ||
{ | ||
// CLR 2 runs .NET 2 to 3.5 | ||
if ((installation.Version.Major == 2 || installation.Version.Major == 3) | ||
&& installation.Version >= latest.Version) | ||
{ | ||
latest = installation; | ||
} | ||
else | ||
{ | ||
break; | ||
} | ||
} | ||
else if (clrVersion == 4) | ||
{ | ||
if (installation.Version.Major == 4 | ||
&& installation.Version >= latest.Version) | ||
{ | ||
latest = installation; | ||
} | ||
else | ||
{ | ||
break; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this loop be replaced with latest = installations.OrderBy(...).FirstOrDefault()
to avoid mutations and to make it simpler?
No description provided.