Convert to switch expression.

This commit is contained in:
2022-11-13 19:59:24 +00:00
parent c5b34ee3d9
commit fca57318f5
58 changed files with 1434 additions and 2456 deletions

View File

@@ -419,21 +419,12 @@ public sealed class ImageVerifyViewModel : ViewModelBase
{
ImageResultVisible = true;
switch(discCheckStatus)
{
case true:
ImageResultText = "Disc image checksums are correct";
break;
case false:
ImageResultText = "Disc image checksums are incorrect";
break;
case null:
ImageResultText = "Disc image does not contain checksums";
break;
}
ImageResultText = discCheckStatus switch
{
true => "Disc image checksums are correct",
false => "Disc image checksums are incorrect",
null => "Disc image does not contain checksums"
};
});
AaruConsole.VerboseWriteLine("Checking disc image checksums took {0} seconds", checkTime.TotalSeconds);
@@ -493,8 +484,8 @@ public sealed class ImageVerifyViewModel : ViewModelBase
{
Progress2Value = all / 512d;
Progress2Text =
$"Checking sector {all} of {_inputFormat.Info.Sectors}, on track {currentTrack.Sequence}";
Progress2Text = $"Checking sector {all} of {_inputFormat.Info.Sectors}, on track {
currentTrack.Sequence}";
});
List<ulong> tempFailingLbas;