-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
LT-21706: Modify webonary status reporting #187
Conversation
9a2d253
to
5a6ce3c
Compare
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.
Reviewable status: 0 of 13 files reviewed, 1 unresolved discussion (waiting on @jasonleenaylor)
Src/xWorks/UploadToWebonaryController.cs
line 157 at r1 (raw file):
{ // if the file is an image file, check for a license file if (file.EndsWith(".jpg", StringComparison.InvariantCultureIgnoreCase) ||
Could we consolidate this?
Code snippet:
var imageExtensions = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase)
{
".jpg", ".jpeg", ".gif", ".png"
};
if (imageExtensions.Contains(Path.GetExtension(file))
{
}
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.
Reviewable status: 0 of 13 files reviewed, 1 unresolved discussion (waiting on @JakeOliver28)
Src/xWorks/UploadToWebonaryController.cs
line 157 at r1 (raw file):
Previously, JakeOliver28 (Jake Oliver) wrote…
Could we consolidate this?
Done.
8c87915
to
3765fda
Compare
Src/xWorks/UploadToWebonaryDlg.cs
Outdated
{ | ||
SaveToModel(); | ||
// Set the status to the greater of the current or the new update | ||
m_uploadStatus = (WebonaryStatusCondition)Enum.ToObject(typeof(WebonaryStatusCondition), |
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.
why the call Enum.ToObject
instead of just casting the result of Math.Max directly to the enum? I can't see any functional difference
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.
Reviewable status: 0 of 13 files reviewed, 3 unresolved discussions (waiting on @hahn-kev and @jasonleenaylor)
Src/xWorks/WebonaryLogViewer.cs
line 60 at r1 (raw file):
{ // Read and deserialize JSON from file foreach (var line in File.ReadLines(filePath))
Should we remove the if statement from inside the loop?
Code snippet:
var nonEmptyLines = File.ReadLines(filePath)
.Where(line => !string.IsNullOrWhiteSpace(line));
foreach (var line in nonEmptyLines)
{
try
{
var entry = JsonConvert.DeserializeObject<UploadLogEntry>(line);
_logEntries.Add(entry);
}
catch (JsonException ex)
{
Console.WriteLine($"Error deserializing line: {ex.Message}");
}
}
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.
Reviewable status: 0 of 13 files reviewed, 3 unresolved discussions (waiting on @hahn-kev and @JakeOliver28)
Src/xWorks/UploadToWebonaryDlg.cs
line 331 at r2 (raw file):
Previously, hahn-kev (Kevin Hahn) wrote…
why the call
Enum.ToObject
instead of just casting the result of Math.Max directly to the enum? I can't see any functional difference
No good reason apparently.
Src/xWorks/WebonaryLogViewer.cs
line 60 at r1 (raw file):
Previously, JakeOliver28 (Jake Oliver) wrote…
Should we remove the if statement from inside the loop?
Done.
Were this change and the other change committed? |
5e42bf4
to
9e8156e
Compare
Previously, JakeOliver28 (Jake Oliver) wrote…
Hmm, apparently not. They are now! 👍 |
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.
Reviewable status: 0 of 13 files reviewed, 3 unresolved discussions (waiting on @hahn-kev)
* Also remove zip file upload code and tests - it is no longer usefull
fcc1839
to
f4cdde6
Compare
This change is