REFACTOR: Reformat code.

This commit is contained in:
2017-12-19 20:33:03 +00:00
parent 77edc7c91c
commit e6f6ace80b
704 changed files with 82627 additions and 83641 deletions

View File

@@ -52,35 +52,50 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("Commands statistics");
DicConsole.WriteLine("===================");
if(Core.Statistics.AllStats.Commands.Analyze > 0)
DicConsole.WriteLine("You have called the Analyze command {0} times", Core.Statistics.AllStats.Commands.Analyze);
DicConsole.WriteLine("You have called the Analyze command {0} times",
Core.Statistics.AllStats.Commands.Analyze);
if(Core.Statistics.AllStats.Commands.Benchmark > 0)
DicConsole.WriteLine("You have called the Benchmark command {0} times", Core.Statistics.AllStats.Commands.Benchmark);
DicConsole.WriteLine("You have called the Benchmark command {0} times",
Core.Statistics.AllStats.Commands.Benchmark);
if(Core.Statistics.AllStats.Commands.Checksum > 0)
DicConsole.WriteLine("You have called the Checksum command {0} times", Core.Statistics.AllStats.Commands.Checksum);
DicConsole.WriteLine("You have called the Checksum command {0} times",
Core.Statistics.AllStats.Commands.Checksum);
if(Core.Statistics.AllStats.Commands.Compare > 0)
DicConsole.WriteLine("You have called the Compare command {0} times", Core.Statistics.AllStats.Commands.Compare);
DicConsole.WriteLine("You have called the Compare command {0} times",
Core.Statistics.AllStats.Commands.Compare);
if(Core.Statistics.AllStats.Commands.CreateSidecar > 0)
DicConsole.WriteLine("You have called the Create-Sidecar command {0} times", Core.Statistics.AllStats.Commands.CreateSidecar);
DicConsole.WriteLine("You have called the Create-Sidecar command {0} times",
Core.Statistics.AllStats.Commands.CreateSidecar);
if(Core.Statistics.AllStats.Commands.Decode > 0)
DicConsole.WriteLine("You have called the Decode command {0} times", Core.Statistics.AllStats.Commands.Decode);
DicConsole.WriteLine("You have called the Decode command {0} times",
Core.Statistics.AllStats.Commands.Decode);
if(Core.Statistics.AllStats.Commands.DeviceInfo > 0)
DicConsole.WriteLine("You have called the Device-Info command {0} times", Core.Statistics.AllStats.Commands.DeviceInfo);
DicConsole.WriteLine("You have called the Device-Info command {0} times",
Core.Statistics.AllStats.Commands.DeviceInfo);
if(Core.Statistics.AllStats.Commands.DeviceReport > 0)
DicConsole.WriteLine("You have called the Device-Report command {0} times", Core.Statistics.AllStats.Commands.DeviceReport);
DicConsole.WriteLine("You have called the Device-Report command {0} times",
Core.Statistics.AllStats.Commands.DeviceReport);
if(Core.Statistics.AllStats.Commands.DumpMedia > 0)
DicConsole.WriteLine("You have called the Dump-Media command {0} times", Core.Statistics.AllStats.Commands.DumpMedia);
DicConsole.WriteLine("You have called the Dump-Media command {0} times",
Core.Statistics.AllStats.Commands.DumpMedia);
if(Core.Statistics.AllStats.Commands.Entropy > 0)
DicConsole.WriteLine("You have called the Entropy command {0} times", Core.Statistics.AllStats.Commands.Entropy);
DicConsole.WriteLine("You have called the Entropy command {0} times",
Core.Statistics.AllStats.Commands.Entropy);
if(Core.Statistics.AllStats.Commands.Formats > 0)
DicConsole.WriteLine("You have called the Formats command {0} times", Core.Statistics.AllStats.Commands.Formats);
DicConsole.WriteLine("You have called the Formats command {0} times",
Core.Statistics.AllStats.Commands.Formats);
if(Core.Statistics.AllStats.Commands.MediaInfo > 0)
DicConsole.WriteLine("You have called the Media-Info command {0} times", Core.Statistics.AllStats.Commands.MediaInfo);
DicConsole.WriteLine("You have called the Media-Info command {0} times",
Core.Statistics.AllStats.Commands.MediaInfo);
if(Core.Statistics.AllStats.Commands.MediaScan > 0)
DicConsole.WriteLine("You have called the Media-Scan command {0} times", Core.Statistics.AllStats.Commands.MediaScan);
DicConsole.WriteLine("You have called the Media-Scan command {0} times",
Core.Statistics.AllStats.Commands.MediaScan);
if(Core.Statistics.AllStats.Commands.PrintHex > 0)
DicConsole.WriteLine("You have called the Print-Hex command {0} times", Core.Statistics.AllStats.Commands.PrintHex);
DicConsole.WriteLine("You have called the Print-Hex command {0} times",
Core.Statistics.AllStats.Commands.PrintHex);
if(Core.Statistics.AllStats.Commands.Verify > 0)
DicConsole.WriteLine("You have called the Verify command {0} times", Core.Statistics.AllStats.Commands.Verify);
DicConsole.WriteLine("You have called the Verify command {0} times",
Core.Statistics.AllStats.Commands.Verify);
DicConsole.WriteLine();
thereAreStats = true;
}
@@ -93,11 +108,17 @@ namespace DiscImageChef.Commands
{
DicConsole.WriteLine("Took {0} seconds to calculate {1} algorithm", chk.Value, chk.algorithm);
}
DicConsole.WriteLine("Took {0} seconds to calculate all algorithms sequentially", Core.Statistics.AllStats.Benchmark.Sequential);
DicConsole.WriteLine("Took {0} seconds to calculate all algorithms at the same time", Core.Statistics.AllStats.Benchmark.All);
DicConsole.WriteLine("Took {0} seconds to calculate entropy", Core.Statistics.AllStats.Benchmark.Entropy);
DicConsole.WriteLine("Used a maximum of {0} bytes of memory", Core.Statistics.AllStats.Benchmark.MaxMemory);
DicConsole.WriteLine("Used a minimum of {0} bytes of memory", Core.Statistics.AllStats.Benchmark.MinMemory);
DicConsole.WriteLine("Took {0} seconds to calculate all algorithms sequentially",
Core.Statistics.AllStats.Benchmark.Sequential);
DicConsole.WriteLine("Took {0} seconds to calculate all algorithms at the same time",
Core.Statistics.AllStats.Benchmark.All);
DicConsole.WriteLine("Took {0} seconds to calculate entropy",
Core.Statistics.AllStats.Benchmark.Entropy);
DicConsole.WriteLine("Used a maximum of {0} bytes of memory",
Core.Statistics.AllStats.Benchmark.MaxMemory);
DicConsole.WriteLine("Used a minimum of {0} bytes of memory",
Core.Statistics.AllStats.Benchmark.MinMemory);
DicConsole.WriteLine();
thereAreStats = true;
}
@@ -108,6 +129,7 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("==================");
foreach(NameValueStats nvs in Core.Statistics.AllStats.Filters)
DicConsole.WriteLine("Filter {0} has been found {1} times.", nvs.name, nvs.Value);
DicConsole.WriteLine();
thereAreStats = true;
}
@@ -118,6 +140,7 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("======================");
foreach(NameValueStats nvs in Core.Statistics.AllStats.MediaImages)
DicConsole.WriteLine("Format {0} has been found {1} times.", nvs.name, nvs.Value);
DicConsole.WriteLine();
thereAreStats = true;
}
@@ -128,6 +151,7 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("====================");
foreach(NameValueStats nvs in Core.Statistics.AllStats.Partitions)
DicConsole.WriteLine("Partitioning scheme {0} has been found {1} times.", nvs.name, nvs.Value);
DicConsole.WriteLine();
thereAreStats = true;
}
@@ -138,6 +162,7 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("=====================");
foreach(NameValueStats nvs in Core.Statistics.AllStats.Filesystems)
DicConsole.WriteLine("Filesystem {0} has been found {1} times.", nvs.name, nvs.Value);
DicConsole.WriteLine();
thereAreStats = true;
}
@@ -147,7 +172,10 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("Device statistics");
DicConsole.WriteLine("=================");
foreach(DeviceStats ds in Core.Statistics.AllStats.Devices)
DicConsole.WriteLine("Device model {0}, manufactured by {1}, with revision {2} and attached via {3}.", ds.Model, ds.Manufacturer, ds.Revision, ds.Bus);
DicConsole
.WriteLine("Device model {0}, manufactured by {1}, with revision {2} and attached via {3}.",
ds.Model, ds.Manufacturer, ds.Revision, ds.Bus);
DicConsole.WriteLine();
thereAreStats = true;
}
@@ -159,10 +187,13 @@ namespace DiscImageChef.Commands
foreach(MediaStats ms in Core.Statistics.AllStats.Medias)
{
if(ms.real)
DicConsole.WriteLine("Media type {0} has been found {1} times in a real device.", ms.type, ms.Value);
DicConsole.WriteLine("Media type {0} has been found {1} times in a real device.", ms.type,
ms.Value);
else
DicConsole.WriteLine("Media type {0} has been found {1} times in a media image.", ms.type, ms.Value);
DicConsole.WriteLine("Media type {0} has been found {1} times in a media image.", ms.type,
ms.Value);
}
DicConsole.WriteLine();
thereAreStats = true;
}
@@ -171,15 +202,22 @@ namespace DiscImageChef.Commands
{
DicConsole.WriteLine("Media scan statistics");
DicConsole.WriteLine("=====================");
DicConsole.WriteLine("Scanned a total of {0} sectors", Core.Statistics.AllStats.MediaScan.Sectors.Total);
DicConsole.WriteLine("Scanned a total of {0} sectors",
Core.Statistics.AllStats.MediaScan.Sectors.Total);
DicConsole.WriteLine("{0} of them correctly", Core.Statistics.AllStats.MediaScan.Sectors.Correct);
DicConsole.WriteLine("{0} of them had errors", Core.Statistics.AllStats.MediaScan.Sectors.Error);
DicConsole.WriteLine("{0} of them took less than 3 ms", Core.Statistics.AllStats.MediaScan.Times.LessThan3ms);
DicConsole.WriteLine("{0} of them took less than 10 ms but more than 3 ms", Core.Statistics.AllStats.MediaScan.Times.LessThan10ms);
DicConsole.WriteLine("{0} of them took less than 50 ms but more than 10 ms", Core.Statistics.AllStats.MediaScan.Times.LessThan50ms);
DicConsole.WriteLine("{0} of them took less than 150 ms but more than 50 ms", Core.Statistics.AllStats.MediaScan.Times.LessThan150ms);
DicConsole.WriteLine("{0} of them took less than 500 ms but more than 150 ms", Core.Statistics.AllStats.MediaScan.Times.LessThan500ms);
DicConsole.WriteLine("{0} of them took less than more than 500 ms", Core.Statistics.AllStats.MediaScan.Times.MoreThan500ms);
DicConsole.WriteLine("{0} of them took less than 3 ms",
Core.Statistics.AllStats.MediaScan.Times.LessThan3ms);
DicConsole.WriteLine("{0} of them took less than 10 ms but more than 3 ms",
Core.Statistics.AllStats.MediaScan.Times.LessThan10ms);
DicConsole.WriteLine("{0} of them took less than 50 ms but more than 10 ms",
Core.Statistics.AllStats.MediaScan.Times.LessThan50ms);
DicConsole.WriteLine("{0} of them took less than 150 ms but more than 50 ms",
Core.Statistics.AllStats.MediaScan.Times.LessThan150ms);
DicConsole.WriteLine("{0} of them took less than 500 ms but more than 150 ms",
Core.Statistics.AllStats.MediaScan.Times.LessThan500ms);
DicConsole.WriteLine("{0} of them took less than more than 500 ms",
Core.Statistics.AllStats.MediaScan.Times.MoreThan500ms);
thereAreStats = true;
}
@@ -187,18 +225,21 @@ namespace DiscImageChef.Commands
{
DicConsole.WriteLine("Verification statistics");
DicConsole.WriteLine("=======================");
DicConsole.WriteLine("{0} media images has been correctly verified", Core.Statistics.AllStats.Verify.MediaImages.Correct);
DicConsole.WriteLine("{0} media images has been determined as containing errors", Core.Statistics.AllStats.Verify.MediaImages.Failed);
DicConsole.WriteLine("{0} media images has been correctly verified",
Core.Statistics.AllStats.Verify.MediaImages.Correct);
DicConsole.WriteLine("{0} media images has been determined as containing errors",
Core.Statistics.AllStats.Verify.MediaImages.Failed);
DicConsole.WriteLine("{0} sectors has been verified", Core.Statistics.AllStats.Verify.Sectors.Total);
DicConsole.WriteLine("{0} sectors has been determined correct", Core.Statistics.AllStats.Verify.Sectors.Correct);
DicConsole.WriteLine("{0} sectors has been determined to contain errors", Core.Statistics.AllStats.Verify.Sectors.Error);
DicConsole.WriteLine("{0} sectors could not be determined as correct or not", Core.Statistics.AllStats.Verify.Sectors.Unverifiable);
DicConsole.WriteLine("{0} sectors has been determined correct",
Core.Statistics.AllStats.Verify.Sectors.Correct);
DicConsole.WriteLine("{0} sectors has been determined to contain errors",
Core.Statistics.AllStats.Verify.Sectors.Error);
DicConsole.WriteLine("{0} sectors could not be determined as correct or not",
Core.Statistics.AllStats.Verify.Sectors.Unverifiable);
thereAreStats = true;
}
if(!thereAreStats)
DicConsole.WriteLine("There are no statistics.");
if(!thereAreStats) DicConsole.WriteLine("There are no statistics.");
}
}
}
}