| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Some minor comments, looks OK overall though. Please wait with the merge until development is merged into master for 1.18.1. Even after that we are thinking of changing the default branch to master, so just hold off from merging atm please
Sorry, something went wrong.
| } | ||
|
|
||
| private static readonly Version s_currentProfileSchemaVersion = new Version(1, 1); | ||
| private static readonly Version s_currentProfileSchemaVersion = new Version(1, 2); |
There was a problem hiding this comment.
I am guessing the code works in such a way that and old schema (change only in minor version) is backwards compatible, i.e. old profiles still work?
Sorry, something went wrong.
There was a problem hiding this comment.
Exactly
Sorry, something went wrong.
There was a problem hiding this comment.
I've added a comment explaining this
Sorry, something went wrong.
| { | ||
| try | ||
| { | ||
| using (FileStream fileStream = File.OpenRead(path)) |
There was a problem hiding this comment.
DRY:
| using (FileStream fileStream = File.OpenRead(path)) | |
| using (var fileStream = File.OpenRead(path)) |
Sorry, something went wrong.
There was a problem hiding this comment.
There's no repetition here; FileStream only occurs once on the line and it's not obvious that File.OpenRead returns that type
Sorry, something went wrong.
| /// <returns>A dictionary with the keys and values of all the release info files on the machine.</returns> | ||
| public static IReadOnlyDictionary<string, string> GetLinuxReleaseInfo() | ||
| { | ||
| var dict = new Dictionary<string, string>(); |
There was a problem hiding this comment.
Maybe a more descriptive name could be useful? What about creating it in a case insensitive way?
Sorry, something went wrong.
There was a problem hiding this comment.
A more descriptive name for the method? Not sure what to call it other than this, but open to suggestions.
I thought about case-sensitivity, but ultimately this is Linux-specific and there's nothing to stop two keys being added that differ only by case
Sorry, something went wrong.
There was a problem hiding this comment.
No, for dict
Sorry, something went wrong.
There was a problem hiding this comment.
Oh! Got it :)
Sorry, something went wrong.
| } | ||
| } | ||
| } | ||
| catch (IOException) |
There was a problem hiding this comment.
Maybe a comment why this could happen and is OK could be helpful.
Sorry, something went wrong.
|
Many of the changes I think here are me moving methods around, might be worth turning off whitespace changes for the diff |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM but please wait with the merge until development is merged into master
Sorry, something went wrong.
|
development is now merged into master and I retargeted the PR for master |
Sorry, something went wrong.
|
Rob Holt (@rjmholt) can we merge this now? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Services PowerShell/PowerShell#9831.
PR Checklist