From 7e04bb70a7dc6b572de36704edc1221a0b3d393b Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Tue, 30 Apr 2024 13:42:23 +0100 Subject: [PATCH] General refactor and cleanup. --- .../Areas/Admin/Controllers/AtasController.cs | 12 ++- .../Areas/Admin/Controllers/ChsController.cs | 11 ++- .../Admin/Controllers/FireWiresController.cs | 3 +- .../GdRomSwapDiscCapabilitiesController.cs | 3 +- .../Admin/Controllers/ScsisController.cs | 12 ++- .../Areas/Admin/Controllers/SscsController.cs | 7 +- .../Controllers/TestedMediasController.cs | 3 +- .../Admin/Controllers/UsbVendorsController.cs | 3 +- .../Areas/Admin/Controllers/UsbsController.cs | 13 ++- Aaru.Server/Controllers/StatsController.cs | 31 +++++-- Aaru.Server/Controllers/UpdateController.cs | 7 +- .../Controllers/UploadReportController.cs | 6 +- .../Controllers/UploadStatsController.cs | 35 ++++--- Aaru.Server/Core/Ata.cs | 6 -- Aaru.Server/Core/ScsiMmcFeatures.cs | 2 - Aaru.Server/Core/ScsiMmcMode.cs | 4 - Aaru.Server/Core/StatsConverter.cs | 92 +++++++++++++------ 17 files changed, 162 insertions(+), 88 deletions(-) diff --git a/Aaru.Server/Areas/Admin/Controllers/AtasController.cs b/Aaru.Server/Areas/Admin/Controllers/AtasController.cs index eeff9eda..7a1725dc 100644 --- a/Aaru.Server/Areas/Admin/Controllers/AtasController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/AtasController.cs @@ -76,7 +76,8 @@ public sealed class AtasController : Controller return View(new IdHashModelForView { - List = dups, Json = JsonConvert.SerializeObject(dups) + List = dups, + Json = JsonConvert.SerializeObject(dups) }); } @@ -149,7 +150,8 @@ public sealed class AtasController : Controller return RedirectToAction(nameof(Compare), new { - id = masterId, rightId = slaveId + id = masterId, + rightId = slaveId }); } @@ -160,7 +162,8 @@ public sealed class AtasController : Controller return RedirectToAction(nameof(Compare), new { - id = masterId, rightId = slaveId + id = masterId, + rightId = slaveId }); } @@ -193,7 +196,8 @@ public sealed class AtasController : Controller { var model = new CompareModel { - LeftId = id, RightId = rightId + LeftId = id, + RightId = rightId }; Ata left = _context.Ata.FirstOrDefault(l => l.Id == id); diff --git a/Aaru.Server/Areas/Admin/Controllers/ChsController.cs b/Aaru.Server/Areas/Admin/Controllers/ChsController.cs index 33aa85a0..fb534d58 100644 --- a/Aaru.Server/Areas/Admin/Controllers/ChsController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/ChsController.cs @@ -21,18 +21,23 @@ public sealed class ChsController : Controller { var dups = _context.Chs.GroupBy(x => new { - x.Cylinders, x.Heads, x.Sectors + x.Cylinders, + x.Heads, + x.Sectors }) .Where(x => x.Count() > 1) .Select(x => new ChsModel { - Cylinders = x.Key.Cylinders, Heads = x.Key.Heads, Sectors = x.Key.Sectors + Cylinders = x.Key.Cylinders, + Heads = x.Key.Heads, + Sectors = x.Key.Sectors }) .ToList(); return View(new ChsModelForView { - List = dups, Json = JsonConvert.SerializeObject(dups) + List = dups, + Json = JsonConvert.SerializeObject(dups) }); } diff --git a/Aaru.Server/Areas/Admin/Controllers/FireWiresController.cs b/Aaru.Server/Areas/Admin/Controllers/FireWiresController.cs index a576e8fd..bffd7e67 100644 --- a/Aaru.Server/Areas/Admin/Controllers/FireWiresController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/FireWiresController.cs @@ -112,7 +112,8 @@ public sealed class FireWiresController : Controller return View(new FireWireModelForView { - List = dups, Json = JsonConvert.SerializeObject(dups) + List = dups, + Json = JsonConvert.SerializeObject(dups) }); } diff --git a/Aaru.Server/Areas/Admin/Controllers/GdRomSwapDiscCapabilitiesController.cs b/Aaru.Server/Areas/Admin/Controllers/GdRomSwapDiscCapabilitiesController.cs index dd305f99..a5614a21 100644 --- a/Aaru.Server/Areas/Admin/Controllers/GdRomSwapDiscCapabilitiesController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/GdRomSwapDiscCapabilitiesController.cs @@ -61,7 +61,8 @@ public sealed class GdRomSwapDiscCapabilitiesController : Controller var model = new TestedMediaDataModel { - TestedMediaId = id, DataName = data + TestedMediaId = id, + DataName = data }; byte[] buffer; diff --git a/Aaru.Server/Areas/Admin/Controllers/ScsisController.cs b/Aaru.Server/Areas/Admin/Controllers/ScsisController.cs index 1a1e5b62..dc89abd8 100644 --- a/Aaru.Server/Areas/Admin/Controllers/ScsisController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/ScsisController.cs @@ -85,7 +85,8 @@ public sealed class ScsisController : Controller return View(new IdHashModelForView { - List = dups, Json = JsonConvert.SerializeObject(dups) + List = dups, + Json = JsonConvert.SerializeObject(dups) }); } @@ -147,7 +148,8 @@ public sealed class ScsisController : Controller { var model = new CompareModel { - LeftId = id, RightId = rightId + LeftId = id, + RightId = rightId }; Scsi left = _context.Scsi.FirstOrDefault(l => l.Id == id); @@ -311,7 +313,8 @@ public sealed class ScsisController : Controller return RedirectToAction(nameof(Compare), new { - id = masterId, rightId = slaveId + id = masterId, + rightId = slaveId }); } @@ -322,7 +325,8 @@ public sealed class ScsisController : Controller return RedirectToAction(nameof(Compare), new { - id = masterId, rightId = slaveId + id = masterId, + rightId = slaveId }); } diff --git a/Aaru.Server/Areas/Admin/Controllers/SscsController.cs b/Aaru.Server/Areas/Admin/Controllers/SscsController.cs index 3b7ca629..b37a2909 100644 --- a/Aaru.Server/Areas/Admin/Controllers/SscsController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/SscsController.cs @@ -46,7 +46,9 @@ public sealed class SscsController : Controller { var dups = _context.Ssc.GroupBy(x => new { - x.BlockSizeGranularity, x.MaxBlockLength, x.MinBlockLength + x.BlockSizeGranularity, + x.MaxBlockLength, + x.MinBlockLength }) .Where(x => x.Count() > 1) .Select(x => new SscModel @@ -59,7 +61,8 @@ public sealed class SscsController : Controller return View(new SscModelForView { - List = dups, Json = JsonConvert.SerializeObject(dups) + List = dups, + Json = JsonConvert.SerializeObject(dups) }); } diff --git a/Aaru.Server/Areas/Admin/Controllers/TestedMediasController.cs b/Aaru.Server/Areas/Admin/Controllers/TestedMediasController.cs index 4d83a8b9..2b17bb30 100644 --- a/Aaru.Server/Areas/Admin/Controllers/TestedMediasController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/TestedMediasController.cs @@ -128,7 +128,8 @@ public sealed class TestedMediasController : Controller var model = new TestedMediaDataModel { - TestedMediaId = id, DataName = data + TestedMediaId = id, + DataName = data }; byte[] buffer; diff --git a/Aaru.Server/Areas/Admin/Controllers/UsbVendorsController.cs b/Aaru.Server/Areas/Admin/Controllers/UsbVendorsController.cs index 63da3c18..7332ea20 100644 --- a/Aaru.Server/Areas/Admin/Controllers/UsbVendorsController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/UsbVendorsController.cs @@ -30,7 +30,8 @@ public sealed class UsbVendorsController : Controller .ThenBy(p => p.ProductId) .Select(p => new UsbProductModel { - ProductId = p.ProductId, ProductName = p.Product + ProductId = p.ProductId, + ProductName = p.Product }) .ToList() }); diff --git a/Aaru.Server/Areas/Admin/Controllers/UsbsController.cs b/Aaru.Server/Areas/Admin/Controllers/UsbsController.cs index 8ed69126..7d6b5513 100644 --- a/Aaru.Server/Areas/Admin/Controllers/UsbsController.cs +++ b/Aaru.Server/Areas/Admin/Controllers/UsbsController.cs @@ -59,7 +59,10 @@ public sealed class UsbsController : Controller { var dups = _context.Usb.GroupBy(x => new { - x.Manufacturer, x.Product, x.VendorID, x.ProductID + x.Manufacturer, + x.Product, + x.VendorID, + x.ProductID }) .Where(x => x.Count() > 1) .Select(x => new UsbModel @@ -73,7 +76,8 @@ public sealed class UsbsController : Controller return View(new UsbModelForView { - List = dups, Json = JsonConvert.SerializeObject(dups) + List = dups, + Json = JsonConvert.SerializeObject(dups) }); } @@ -112,9 +116,8 @@ public sealed class UsbsController : Controller .ToArray()) { if(slave.Descriptors != null && master.Descriptors != null) - { - if(!master.Descriptors.SequenceEqual(slave.Descriptors)) continue; - } + if(!master.Descriptors.SequenceEqual(slave.Descriptors)) + continue; foreach(Device device in _context.Devices.Where(d => d.USB.Id == slave.Id)) device.USB = master; diff --git a/Aaru.Server/Controllers/StatsController.cs b/Aaru.Server/Controllers/StatsController.cs index 628ceda5..86bec7f2 100644 --- a/Aaru.Server/Controllers/StatsController.cs +++ b/Aaru.Server/Controllers/StatsController.cs @@ -121,7 +121,8 @@ public sealed class StatsController : Controller { versions.Add(new NameValueStats { - name = nvs.Name == "previous" ? "Previous than 3.4.99.0" : nvs.Name, Value = nvs.Count + name = nvs.Name == "previous" ? "Previous than 3.4.99.0" : nvs.Name, + Value = nvs.Count }); } @@ -157,14 +158,18 @@ public sealed class StatsController : Controller { realMedia.Add(new MediaItem { - Type = mediaType.type, SubType = mediaType.subType, Count = nvs.Count + Type = mediaType.type, + SubType = mediaType.subType, + Count = nvs.Count }); } else { virtualMedia.Add(new MediaItem { - Type = mediaType.type, SubType = mediaType.subType, Count = nvs.Count + Type = mediaType.type, + SubType = mediaType.subType, + Count = nvs.Count }); } } @@ -174,14 +179,18 @@ public sealed class StatsController : Controller { realMedia.Add(new MediaItem { - Type = nvs.Type, SubType = null, Count = nvs.Count + Type = nvs.Type, + SubType = null, + Count = nvs.Count }); } else { virtualMedia.Add(new MediaItem { - Type = nvs.Type, SubType = null, Count = nvs.Count + Type = nvs.Type, + SubType = null, + Count = nvs.Count }); } } @@ -309,7 +318,8 @@ public sealed class StatsController : Controller x => x.Count) .Select(g => new { - g.Key.Name, Count = g.Sum() + g.Key.Name, + Count = g.Sum() }); var result = new string[2][]; @@ -584,11 +594,13 @@ public sealed class StatsController : Controller .Distinct() .Select(deviceBus => new { - deviceBus, deviceBusCount = _ctx.DeviceStats.Count(d => d.Bus == deviceBus) + deviceBus, + deviceBusCount = _ctx.DeviceStats.Count(d => d.Bus == deviceBus) }) .Select(t => new { - Name = t.deviceBus, Count = t.deviceBusCount + Name = t.deviceBus, + Count = t.deviceBusCount }) .ToList(); @@ -621,7 +633,8 @@ public sealed class StatsController : Controller }) .Select(t => new { - Name = t.manufacturer, Count = t.manufacturerCount + Name = t.manufacturer, + Count = t.manufacturerCount }) .ToList(); diff --git a/Aaru.Server/Controllers/UpdateController.cs b/Aaru.Server/Controllers/UpdateController.cs index da3b1705..a061e5e3 100644 --- a/Aaru.Server/Controllers/UpdateController.cs +++ b/Aaru.Server/Controllers/UpdateController.cs @@ -60,7 +60,8 @@ public sealed class UpdateController : Controller { sync.UsbVendors.Add(new UsbVendorDto { - VendorId = vendor.VendorId, Vendor = vendor.Vendor + VendorId = vendor.VendorId, + Vendor = vendor.Vendor }); } @@ -128,7 +129,9 @@ public sealed class UpdateController : Controller return new ContentResult { - StatusCode = (int)HttpStatusCode.OK, Content = sw.ToString(), ContentType = "application/json" + StatusCode = (int)HttpStatusCode.OK, + Content = sw.ToString(), + ContentType = "application/json" }; } } \ No newline at end of file diff --git a/Aaru.Server/Controllers/UploadReportController.cs b/Aaru.Server/Controllers/UploadReportController.cs index 8b0d0d7e..fa72ba3f 100644 --- a/Aaru.Server/Controllers/UploadReportController.cs +++ b/Aaru.Server/Controllers/UploadReportController.cs @@ -64,7 +64,8 @@ public sealed class UploadReportController : Controller { var response = new ContentResult { - StatusCode = (int)HttpStatusCode.OK, ContentType = "text/plain" + StatusCode = (int)HttpStatusCode.OK, + ContentType = "text/plain" }; try @@ -228,7 +229,8 @@ public sealed class UploadReportController : Controller { var response = new ContentResult { - StatusCode = (int)HttpStatusCode.OK, ContentType = "text/plain" + StatusCode = (int)HttpStatusCode.OK, + ContentType = "text/plain" }; try diff --git a/Aaru.Server/Controllers/UploadStatsController.cs b/Aaru.Server/Controllers/UploadStatsController.cs index becf3b60..971a2224 100644 --- a/Aaru.Server/Controllers/UploadStatsController.cs +++ b/Aaru.Server/Controllers/UploadStatsController.cs @@ -57,7 +57,8 @@ public sealed class UploadStatsController : Controller { var response = new ContentResult { - StatusCode = (int)HttpStatusCode.OK, ContentType = "text/plain" + StatusCode = (int)HttpStatusCode.OK, + ContentType = "text/plain" }; try @@ -101,7 +102,8 @@ public sealed class UploadStatsController : Controller { var response = new ContentResult { - StatusCode = (int)HttpStatusCode.OK, ContentType = "text/plain" + StatusCode = (int)HttpStatusCode.OK, + ContentType = "text/plain" }; try @@ -131,7 +133,8 @@ public sealed class UploadStatsController : Controller { await _ctx.Commands.AddAsync(new Command { - Name = nvs.name, Count = nvs.Value + Name = nvs.name, + Count = nvs.Value }); } else @@ -149,7 +152,8 @@ public sealed class UploadStatsController : Controller { await _ctx.Versions.AddAsync(new Version { - Name = nvs.name, Count = nvs.Value + Name = nvs.name, + Count = nvs.Value }); } else @@ -167,7 +171,8 @@ public sealed class UploadStatsController : Controller { await _ctx.Filesystems.AddAsync(new Filesystem { - Name = nvs.name, Count = nvs.Value + Name = nvs.name, + Count = nvs.Value }); } else @@ -185,7 +190,8 @@ public sealed class UploadStatsController : Controller { await _ctx.Partitions.AddAsync(new Partition { - Name = nvs.name, Count = nvs.Value + Name = nvs.name, + Count = nvs.Value }); } else @@ -203,7 +209,8 @@ public sealed class UploadStatsController : Controller { await _ctx.MediaFormats.AddAsync(new MediaFormat { - Name = nvs.name, Count = nvs.Value + Name = nvs.name, + Count = nvs.Value }); } else @@ -221,7 +228,8 @@ public sealed class UploadStatsController : Controller { await _ctx.Filters.AddAsync(new Filter { - Name = nvs.name, Count = nvs.Value + Name = nvs.name, + Count = nvs.Value }); } else @@ -261,7 +269,9 @@ public sealed class UploadStatsController : Controller { await _ctx.Medias.AddAsync(new Media { - Type = media.type, Real = media.real, Count = media.Value + Type = media.type, + Real = media.real, + Count = media.Value }); } else @@ -302,7 +312,9 @@ public sealed class UploadStatsController : Controller { await _ctx.RemoteApplications.AddAsync(new RemoteApplication { - Name = application.name, Version = application.version, Count = application.Value + Name = application.name, + Version = application.version, + Count = application.Value }); } else @@ -320,7 +332,8 @@ public sealed class UploadStatsController : Controller { await _ctx.RemoteArchitectures.AddAsync(new RemoteArchitecture { - Name = nvs.name, Count = nvs.Value + Name = nvs.name, + Count = nvs.Value }); } else diff --git a/Aaru.Server/Core/Ata.cs b/Aaru.Server/Core/Ata.cs index 3196414c..9504ef57 100644 --- a/Aaru.Server/Core/Ata.cs +++ b/Aaru.Server/Core/Ata.cs @@ -1065,9 +1065,7 @@ public static class Ata } if(ataIdentify.InterseekDelay != 0x0000 && ataIdentify.InterseekDelay != 0xFFFF) - { ataOneValue.Add($"{ataIdentify.InterseekDelay} microseconds of interseek delay for ISO-7779 acoustic testing"); - } if((ushort)ataIdentify.DeviceFormFactor != 0x0000 && (ushort)ataIdentify.DeviceFormFactor != 0xFFFF) { @@ -1669,9 +1667,7 @@ public static class Ata if(ataIdentify.DataSetMgmt.HasFlag(Identify.DataSetMgmtBit.Trim)) ataOneValue.Add("TRIM is supported"); if(ataIdentify.DataSetMgmtSize > 0) - { ataOneValue.Add($"DATA SET MANAGEMENT can receive a maximum of {ataIdentify.DataSetMgmtSize} blocks of 512 bytes"); - } if(ataIdentify.SecurityStatus.HasFlag(Identify.SecurityStatusBit.Supported)) { @@ -1706,9 +1702,7 @@ public static class Ata ataOneValue.Add($"{ataIdentify.SecurityEraseTime * 2} minutes to complete secure erase"); if(ataIdentify.SecurityStatus.HasFlag(Identify.SecurityStatusBit.Enhanced)) - { ataOneValue.Add($"{ataIdentify.EnhancedSecurityEraseTime * 2} minutes to complete enhanced secure erase"); - } ataOneValue.Add($"Master password revision code: {ataIdentify.MasterPasswordRevisionCode}"); } diff --git a/Aaru.Server/Core/ScsiMmcFeatures.cs b/Aaru.Server/Core/ScsiMmcFeatures.cs index f1730f59..120dbb0a 100644 --- a/Aaru.Server/Core/ScsiMmcFeatures.cs +++ b/Aaru.Server/Core/ScsiMmcFeatures.cs @@ -189,9 +189,7 @@ public static class ScsiMmcFeatures if(ftr.LogicalBlockSize > 0) mmcOneValue.Add($"{ftr.LogicalBlockSize} bytes per logical block"); if(ftr.MultiRead) - { mmcOneValue.Add("Drive claims capability to read all CD formats according to OSTA Multi-Read Specification"); - } if(ftr.PhysicalInterfaceStandard.HasValue) { diff --git a/Aaru.Server/Core/ScsiMmcMode.cs b/Aaru.Server/Core/ScsiMmcMode.cs index 8fa3f843..b5864300 100644 --- a/Aaru.Server/Core/ScsiMmcMode.cs +++ b/Aaru.Server/Core/ScsiMmcMode.cs @@ -153,13 +153,9 @@ public static class ScsiMmcMode if(mode.CurrentWriteSpeedSelected > 0) { if(mode.RotationControlSelected == 0) - { mmcOneValue.Add($"Drive's current writing speed is {mode.CurrentWriteSpeedSelected} Kbyte/sec. in CLV mode"); - } else if(mode.RotationControlSelected == 1) - { mmcOneValue.Add($"Drive's current writing speed is {mode.CurrentWriteSpeedSelected} Kbyte/sec. in pure CAV mode"); - } } else { diff --git a/Aaru.Server/Core/StatsConverter.cs b/Aaru.Server/Core/StatsConverter.cs index d22812f2..a46e0956 100644 --- a/Aaru.Server/Core/StatsConverter.cs +++ b/Aaru.Server/Core/StatsConverter.cs @@ -50,7 +50,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.Analyze, Name = "fs-info" + Count = newStats.Commands.Analyze, + Name = "fs-info" }); } else @@ -65,7 +66,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.Benchmark, Name = "benchmark" + Count = newStats.Commands.Benchmark, + Name = "benchmark" }); } else @@ -80,7 +82,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.Checksum, Name = "checksum" + Count = newStats.Commands.Checksum, + Name = "checksum" }); } else @@ -95,7 +98,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.Compare, Name = "compare" + Count = newStats.Commands.Compare, + Name = "compare" }); } else @@ -110,7 +114,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.CreateSidecar, Name = "create-sidecar" + Count = newStats.Commands.CreateSidecar, + Name = "create-sidecar" }); } else @@ -125,7 +130,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.Decode, Name = "decode" + Count = newStats.Commands.Decode, + Name = "decode" }); } else @@ -140,7 +146,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.DeviceInfo, Name = "device-info" + Count = newStats.Commands.DeviceInfo, + Name = "device-info" }); } else @@ -155,7 +162,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.DeviceReport, Name = "device-report" + Count = newStats.Commands.DeviceReport, + Name = "device-report" }); } else @@ -170,7 +178,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.DumpMedia, Name = "dump-media" + Count = newStats.Commands.DumpMedia, + Name = "dump-media" }); } else @@ -185,7 +194,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.Entropy, Name = "entropy" + Count = newStats.Commands.Entropy, + Name = "entropy" }); } else @@ -200,7 +210,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.Formats, Name = "formats" + Count = newStats.Commands.Formats, + Name = "formats" }); } else @@ -215,7 +226,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.MediaInfo, Name = "media-info" + Count = newStats.Commands.MediaInfo, + Name = "media-info" }); } else @@ -230,7 +242,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.MediaScan, Name = "media-scan" + Count = newStats.Commands.MediaScan, + Name = "media-scan" }); } else @@ -245,7 +258,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.PrintHex, Name = "printhex" + Count = newStats.Commands.PrintHex, + Name = "printhex" }); } else @@ -260,7 +274,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.Verify, Name = "verify" + Count = newStats.Commands.Verify, + Name = "verify" }); } else @@ -275,7 +290,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.Ls, Name = "ls" + Count = newStats.Commands.Ls, + Name = "ls" }); } else @@ -290,7 +306,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.ExtractFiles, Name = "extract-files" + Count = newStats.Commands.ExtractFiles, + Name = "extract-files" }); } else @@ -305,7 +322,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.ListDevices, Name = "list-devices" + Count = newStats.Commands.ListDevices, + Name = "list-devices" }); } else @@ -320,7 +338,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.ListEncodings, Name = "list-encodings" + Count = newStats.Commands.ListEncodings, + Name = "list-encodings" }); } else @@ -335,7 +354,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.ConvertImage, Name = "convert-image" + Count = newStats.Commands.ConvertImage, + Name = "convert-image" }); } else @@ -350,7 +370,8 @@ public static class StatsConverter { ctx.Commands.Add(new Command { - Count = newStats.Commands.ImageInfo, Name = "image-info" + Count = newStats.Commands.ImageInfo, + Name = "image-info" }); } else @@ -373,7 +394,9 @@ public static class StatsConverter { ctx.OperatingSystems.Add(new OperatingSystem { - Count = operatingSystem.Value, Name = operatingSystem.name, Version = operatingSystem.version + Count = operatingSystem.Value, + Name = operatingSystem.name, + Version = operatingSystem.version }); } else @@ -388,7 +411,8 @@ public static class StatsConverter { ctx.OperatingSystems.Add(new OperatingSystem { - Count = 1, Name = "Linux" + Count = 1, + Name = "Linux" }); } else @@ -407,7 +431,8 @@ public static class StatsConverter { ctx.Versions.Add(new Version { - Count = nvs.Value, Name = nvs.name + Count = nvs.Value, + Name = nvs.name }); } else @@ -422,7 +447,8 @@ public static class StatsConverter { ctx.Versions.Add(new Version { - Count = 1, Name = "previous" + Count = 1, + Name = "previous" }); } else @@ -441,7 +467,8 @@ public static class StatsConverter { ctx.Filesystems.Add(new Filesystem { - Count = nvs.Value, Name = nvs.name + Count = nvs.Value, + Name = nvs.name }); } else @@ -461,7 +488,8 @@ public static class StatsConverter { ctx.Partitions.Add(new Partition { - Count = nvs.Value, Name = nvs.name + Count = nvs.Value, + Name = nvs.name }); } else @@ -481,7 +509,8 @@ public static class StatsConverter { ctx.MediaFormats.Add(new MediaFormat { - Count = nvs.Value, Name = nvs.name + Count = nvs.Value, + Name = nvs.name }); } else @@ -501,7 +530,8 @@ public static class StatsConverter { ctx.Filters.Add(new Filter { - Count = nvs.Value, Name = nvs.name + Count = nvs.Value, + Name = nvs.name }); } else @@ -539,7 +569,9 @@ public static class StatsConverter { ctx.Medias.Add(new Media { - Count = media.Value, Real = media.real, Type = media.type + Count = media.Value, + Real = media.real, + Type = media.type }); } else