microsoft / BITS-Manager

The BITS Manager is a sample WPF C#/.NET utility to examine and control your BITS uploads and downloads
MIT License
77 stars 23 forks source link

Pesmith master/polish code for blog #9

Closed PeterSmithRedmond closed 5 years ago

PeterSmithRedmond commented 5 years ago

First version of a pull request to update code based on team feedback. Still missing is that the unit tests are not implemented and the catwches are still for Exception and not an exception subclass.

PeterSmithRedmond commented 5 years ago

Using “this.(item)” syntax Is contrary to the C# coding guidelines. At the time, the team thought it was part of the guidelines.

Peter

From: mstojens notifications@github.com Sent: Wednesday, December 5, 2018 2:52 PM To: Microsoft/BITS-Manager BITS-Manager@noreply.github.com Cc: Peter Smith pesmith@microsoft.com; Author author@noreply.github.com Subject: Re: [Microsoft/BITS-Manager] Pesmith master/polish code for blog (#9)

@mstojens commented on this pull request.

I thought we agreed to use "this" notation during review... is there a standard justification for not using this I'm not aware of?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23pullrequestreview-182012877&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C9db7c4f5bf0d460478b208d65b04443c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796471211111934&sdata=K15NjeZjGUcmQQuM3VNUiQMVDzFM744fkx1JcTKXuJc%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAbyJtyqDD3sLLMrHE4yX04IQ-Jod9ekoks5u2E4QgaJpZM4ZBvOn&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C9db7c4f5bf0d460478b208d65b04443c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796471211121939&sdata=GBilfJteWuoaizNoA95KjI1VsJ%2BaFSA1iafhQcOcuFM%3D&reserved=0.

ByDesign

Diego-Perez-Botero commented 5 years ago

We're using the following coding guidelines: https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md #Closed

PeterSmithRedmond commented 5 years ago

I just tried to add newlines, and CodeMaid removes them ☹.

I hate using anything other than default settings, so my preference is to keep the files as-is

Peter

From: David Barajas notifications@github.com Sent: Wednesday, December 5, 2018 4:11 PM To: Microsoft/BITS-Manager BITS-Manager@noreply.github.com Cc: Peter Smith pesmith@microsoft.com; Author author@noreply.github.com Subject: Re: [Microsoft/BITS-Manager] Pesmith master/polish code for blog (#9)

@dabbers commented on this pull request.

Looks like a bunch of files are missing a newline at the end. https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newlinehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F729692%2Fwhy-should-text-files-end-with-a-newline&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599140022&sdata=cq5GG86oWycIm5Ttv3n16UnQzu%2FU5mul7rJTY5xwAWM%3D&reserved=0 Also your newly added test files are missing the copyright header.


In BITSManager/App.xaml.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239275025&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599140022&sdata=Xj0qbEMNZz8JkLiKhuA4eqmvL%2BDYBlAR%2Fp6Pmo4uOPU%3D&reserved=0:

         MessageBox.Show(message, BITSManager.Properties.Resources.UnhandledExceptionTitle);
     }

 }

-}

+}

⬇️ Suggested change

-}

+}

Add a newline at end of the file.


In BITSManager/BitsConversions.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239276651&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599150031&sdata=Zoj7BXU0K3ICypDS1hRgcpcA1BCR7tqtFTMGf%2FQ7Y4s%3D&reserved=0:

         }
     }

 }

-}

+}

Add newline at end of file. ⬇️ Suggested change

-}

+}


In BITSManager/CreateNewJobWindow.xaml.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239277685&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599150031&sdata=BuE1%2FdBn8cpFj0xdLHNmPxIz4VmYfLJgO1Gqg6iwxtw%3D&reserved=0:

     }

The code below would throw a null reference result if SelectedValue cannot be casted as a ComboBoxItem. It would be better to use an explicit cast (ComboBoxItem) so you'll get an invalid cast exception (this makes determining the actual issue easier).

Either that, or do ?.Tag to avoid exceptions altogether.


In BITSManager/FileDetailViewControl.xaml.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239278133&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599160040&sdata=8F7w9gJ1fnMN40bmfZCmz%2FcfYWP9oGeGMgFXh%2FGCMQk%3D&reserved=0:

                 Properties.Resources.ErrorTitle);
         }

     }

 }

-}

+}

Another missing newline at the end. ⬇️ Suggested change

-}

+}


In BITSManager/JobDetailViewControl.xamlhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239278319&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599160040&sdata=1nsE96NnDSfs33sdScs46WTRy%2F18XXQ%2FMxjrKDO2EKA%3D&reserved=0:

 </Grid>

-

+

Newline at eof. ⬇️ Suggested change

-

+


In BITSManager/JobDetailViewControl.xaml.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239278967&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599170045&sdata=iNVxRBUAL61Amkp9aLVjPnPLQJ13hN1CDW3SFfTreN4%3D&reserved=0:

                 {
                     Job.GetError(out Error);

                     Error.GetError(out ErrorContext, out ErrorHRESULT);

                     Error.GetErrorDescription((uint)langid, out ErrorDescription);

                     Error.GetErrorContextDescription((uint)langid, out ErrorContextDescription);

String.Format would be clearer to read imo.


In BITSManager/JobDetailViewControl.xaml.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239279620&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599170045&sdata=92wTMqSyY1iYHFuSm2oyVnM%2Fs%2BjjreX4rmvKNp%2B5hFM%3D&reserved=0:

 }

-}

+}

eof nl ⬇️ Suggested change

-}

+}


In BITSManager/JobViewControl.xamlhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239279989&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599180054&sdata=UE%2FKr56kKD4df2LRTwlN77TgnBWBN2tGI6BJgn%2FQR40%3D&reserved=0:

@@ -35,4 +34,4 @@ Licensed under the MIT License.

         <TextBlock x:Name="uiJobState" FontSize="32" AutomationProperties.IsOffscreenBehavior="Offscreen" />

     </StackPanel>

 </Grid>

-

+

eof nl ⬇️ Suggested change

-

+


In BITSManager/MainWindow.xaml.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239281303&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599180054&sdata=8JEwumONsSL6O4cSXJGeVyCXjDI1HyFawg%2FStvQ95Bg%3D&reserved=0:

@@ -187,7 +215,6 @@ private int GetJobIndex(BITS.IBackgroundCopyJob job)

         return -1;

     }

-

     private static bool GuidEqual(BITS.GUID a, BITS.GUID b)

Could we just pass the BITS.GUID into the .NET GUID structure and use the native compare instead? Maybe not since we're just creating and deleting a bunch of GUIDs needlessly, but I'd feel safer about the compare operation being correct.


In BITSManager/MainWindow.xaml.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239281547&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599190063&sdata=8Dinf5xFqDsCtLOeekZW%2BQla96xH%2FlOOpsU1QzgNcmY%3D&reserved=0:

     }
 }

-}

+}

eof nl ⬇️ Suggested change

-}

+}


In BITSManager/Properties/AssemblyInfo.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239281748&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599190063&sdata=pqVVLFnvXltR5IdqPrYVGSMpGJ14uEPkMNJbiQ%2F0ivk%3D&reserved=0:

@@ -52,4 +48,4 @@

// by using the '*' as shown below:

// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.0.0.0")]

-[assembly: AssemblyFileVersion("1.0.0.0")]

+[assembly: AssemblyFileVersion("1.0.0.0")]

⬇️ Suggested change

-[assembly: AssemblyFileVersion("1.0.0.0")]

+[assembly: AssemblyFileVersion("1.0.0.0")]


In BITSManager/Properties/Resources.resxhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239282032&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599200068&sdata=V9scDyGBLc5nGx7%2F2svxGjZYTJL%2FoU%2B21d3OUYDaQbk%3D&reserved=0:

⬇️ Suggested change

+


In BITSManager/QuickFileDownloadWindow.xamlhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239282107&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599200068&sdata=1OdJ0lkJLgVcSfxMkVwyuBaRwhpBE0CrtenVX1K1Gkg%3D&reserved=0:

             <Button Content="{x:Static p:Resources.DialogCancel}" Click="OnCancel" MinWidth="60" Margin="10,0,0,0" TabIndex="4" />
         </StackPanel>

     </StackPanel>

 </Border>

-

+

⬇️ Suggested change

-

+


In BITSManager/QuickFileDownloadWindow.xaml.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239283341&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599210077&sdata=9Ah%2BmUKvksyZP9jaVeGnt9GNYJeWZDbVMb306HI9MqI%3D&reserved=0:

@@ -133,20 +113,20 @@ private void Poll(BITS.IBackgroundCopyJob job)

                         case BITS.BG_JOB_STATE.BG_JOB_STATE_ACKNOWLEDGED:

                             jobIsFinal = true;

                             break;

+

                         default:

                             Task.Delay(500); // delay a little bit

This should be moved outside of the switch and done for the whole loop (probably at the top before the switch so finalState calls don't sleep for half a second.

I'm also not a fan of creating a poll thread for every job, but probably isn't a huge deal for this sample app.


In BITSManager/TabifyHttpHeaders.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239283895&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599210077&sdata=fDO7iRz24%2BJLBtubQFuZVEIepb%2BKf9jaql1ENe3O560%3D&reserved=0:

@@ -0,0 +1,78 @@

+using System.Text;

Missing copyright.


In BITSManager/TabifyHttpHeaders.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239285485&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599220082&sdata=4jDTm5HTO41IP7aIribxG0P1paywU7Q%2B0NPtcJtWKUM%3D&reserved=0:

@@ -0,0 +1,78 @@

+using System.Text;

+

+namespace BITSManager

+{

A regex could do this job fairly easier, and be less error prone imo. Something like:

"^([^:]+):([^\n]+)((?:\r{0,1})\n){0,1}$" with replace rules like $1:\t$3


In BITSManager/TabifyHttpHeaders.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239285569&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599220082&sdata=DWHeipqFQ1cPromxT%2Fls81XNPHrOuSljVBBgu5y%2FVAI%3D&reserved=0:

  • // to line up a little bit neatly.

+}

⬇️ Suggested change

-}

+}


In BITSManagerTests/BITSManagerTests.csprojhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239285647&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599230086&sdata=nNnqRQmDLKHsy%2Fz%2BmBYAJ8YVSW3zps74ZJcF4JVDN0c%3D&reserved=0:

@@ -0,0 +1,111 @@

+<?xml version="1.0" encoding="utf-8"?>

Does this need copyright header?


In BITSManagerTests/BitsConversionsTests.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239285735&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599230086&sdata=xpu7AeCLQtwGxTnxskiu5jOGUCyt1FGXis7bChLa1Y0%3D&reserved=0:

@@ -0,0 +1,87 @@

+using Microsoft.VisualStudio.TestTools.UnitTesting;

Copyright header.


In BITSManagerTests/BitsConversionsTests.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239285857&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599240096&sdata=gzXCpSTHe7N7gQHfFtNWnfkAig8uh09jWMr4HeJvVkc%3D&reserved=0:

@@ -0,0 +1,87 @@

+using Microsoft.VisualStudio.TestTools.UnitTesting;

Looks like a bunch of your files are missing the copyright header and newline at end.


In BITSManagerTests/TabifyHttpHeadersTests.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239286072&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599240096&sdata=lSkQLhJqFolMszEdCLWmmUWrmbUC4yjF%2BA07a3%2F%2BhZg%3D&reserved=0:

@@ -0,0 +1,54 @@

+using Microsoft.VisualStudio.TestTools.UnitTesting;

+

+namespace BITSManager.Tests

+{

Can't you just use the \t character?


In BITSManagerTests/TabifyHttpHeadersTests.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239286120&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599250100&sdata=Z15%2FlosimdHsyMfJs334nChNPVLUz1MR2poqVE%2B6EVU%3D&reserved=0:

@@ -0,0 +1,54 @@

+using Microsoft.VisualStudio.TestTools.UnitTesting;

+

+namespace BITSManager.Tests

+{

You can move it into the class Scope since it looks like every test uses this same thing.


In BITSManagerTests/BitsConversionsTests.cshttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23discussion_r239286341&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599250100&sdata=Jy0sz1wKF%2BiORaQ8j6FSPy39QoscjQVyTDASC9p8xjE%3D&reserved=0:

  • {

Why does this string need '$' ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBITS-Manager%2Fpull%2F9%23pullrequestreview-182020311&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599260109&sdata=eSM8KEy9uNsC7ZxKe5IMVkW2Zf%2FaBQijyG17zteVQdA%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAbyJt7TZwYGjVZhiVqxGo4MnveUSetbpks5u2GCOgaJpZM4ZBvOn&data=02%7C01%7Cpesmith%40exchange.microsoft.com%7C62face6fdeb34aefb87808d65b0f4bca%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796518599260109&sdata=V9%2BcStQqlG56nOB5OYV1ST6Qzcb3dnCdB5w8Tz0AK0A%3D&reserved=0.

Closed

PeterSmithRedmond commented 5 years ago

Agree, although note that the written coding styles don't deal with lambdas the same way that the auto formatting rules do.


In reply to: 444684566 [](ancestors = 444684566)

DavidGoll commented 5 years ago
            case BITS.BG_JOB_STATE.BG_JOB_STATE_CONNECTING: return "😵";

According to the guidelines, we should be using Unicode escape sequences (\uXXXX) instead of literal characters. #Resolved


Refers to: BITSManager/BitsConversions.cs:166 in 3c838e0. [](commit_id = 3c838e07453b0ce218ae5cfcdcc642b9fdeb521d, deletion_comment = False)

Diego-Perez-Botero commented 5 years ago
<comment>Shown when a job has errors, but it's not in an ERROR or TRANSIENT_ERROR state (e.g., SUSPENDED)</comment>

"previously had" #Closed


Refers to: BITSManager/Properties/Resources.resx:342 in 0cf3b87. [](commit_id = 0cf3b87c7bfda5288ab595341c687f17607c66b7, deletion_comment = False)

Diego-Perez-Botero commented 5 years ago
<comment>Shown when a job has errors, but it's not in an ERROR or TRANSIENT_ERROR state (e.g., SUSPENDED)</comment>

"state anymore" #Closed


Refers to: BITSManager/Properties/Resources.resx:342 in 0cf3b87. [](commit_id = 0cf3b87c7bfda5288ab595341c687f17607c66b7, deletion_comment = False)

Diego-Perez-Botero commented 5 years ago

General comment: shouldn't the UI element variable names be using the "_ui" prefix (with an underscore at the beginning) to be consistent with the corefx guidelines? #Closed

Diego-Perez-Botero commented 5 years ago

They're non-static class members


In reply to: 448744818 [](ancestors = 448744818)

Diego-Perez-Botero commented 5 years ago
                // Do something with the job

Is this a placeholder comment? It's awfully generic. #Closed


Refers to: BITSManager/MainWindow.xaml.cs:123 in 0cf3b87. [](commit_id = 0cf3b87c7bfda5288ab595341c687f17607c66b7, deletion_comment = False)

Diego-Perez-Botero commented 5 years ago
<comment>Shown when job cost isn't availble (e.g., on Windows 7)</comment>

typo #Closed


Refers to: BITSManager/Properties/Resources.resx:281 in 0cf3b87. [](commit_id = 0cf3b87c7bfda5288ab595341c687f17607c66b7, deletion_comment = False)

Diego-Perez-Botero commented 5 years ago
<comment>BITS JobState hover text for queued</comment>

Should the other job states have a similar comment? #Closed


Refers to: BITSManager/Properties/Resources.resx:451 in 0cf3b87. [](commit_id = 0cf3b87c7bfda5288ab595341c687f17607c66b7, deletion_comment = False)

Diego-Perez-Botero commented 5 years ago

The app crashes if I try to start a "Quick Download" pointing to a local folder that I don't have access to (e.g., c:\windows\system32 as a non-elevated user). Same happens if I enter an invalid URL.

Similar symptoms affect the "Add File to Job" functionality. #Closed

Diego-Perez-Botero commented 5 years ago

Invalid file paths and URIs still cause the app to crash, even with Iteration 16 changes


In reply to: 448768300 [](ancestors = 448768300)

PeterSmithRedmond commented 5 years ago
<comment>BITS JobState hover text for queued</comment>

All of the strings are now commented, too!


In reply to: 448766616 [](ancestors = 448766616)


Refers to: BITSManager/Properties/Resources.resx:451 in 0cf3b87. [](commit_id = 0cf3b87c7bfda5288ab595341c687f17607c66b7, deletion_comment = False)

PeterSmithRedmond commented 5 years ago
            case BITS.BG_JOB_STATE.BG_JOB_STATE_CONNECTING: return "😵";

Updated by moving all of these icons to the resource file. I also added a comment including the official Unicode name for each one so that if they get broken, they can be re-created more easily.


In reply to: 448282904 [](ancestors = 448282904)


Refers to: BITSManager/BitsConversions.cs:166 in 3c838e0. [](commit_id = 3c838e07453b0ce218ae5cfcdcc642b9fdeb521d, deletion_comment = False)