mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Loop can be converted into LINQ-expression.
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
using DiscImageChef.Metadata;
|
||||
|
||||
namespace DiscImageChef.Server.App_Start
|
||||
@@ -148,16 +150,13 @@ namespace DiscImageChef.Server.App_Start
|
||||
}
|
||||
|
||||
if(mode.WriteSpeedPerformanceDescriptors != null)
|
||||
foreach(Decoders.SCSI.Modes.ModePage_2A_WriteDescriptor descriptor in
|
||||
mode.WriteSpeedPerformanceDescriptors)
|
||||
if(descriptor.WriteSpeed > 0)
|
||||
if(descriptor.RotationControl == 0)
|
||||
mmcOneValue.Add(string.Format("Drive supports writing at {0} Kbyte/sec. in CLV mode",
|
||||
descriptor.WriteSpeed));
|
||||
else if(descriptor.RotationControl == 1)
|
||||
mmcOneValue
|
||||
.Add(string.Format("Drive supports writing at is {0} Kbyte/sec. in pure CAV mode",
|
||||
descriptor.WriteSpeed));
|
||||
foreach(Modes.ModePage_2A_WriteDescriptor descriptor in mode.WriteSpeedPerformanceDescriptors.Where(descriptor => descriptor.WriteSpeed > 0)) if(descriptor.RotationControl == 0)
|
||||
mmcOneValue.Add(string.Format("Drive supports writing at {0} Kbyte/sec. in CLV mode",
|
||||
descriptor.WriteSpeed));
|
||||
else if(descriptor.RotationControl == 1)
|
||||
mmcOneValue
|
||||
.Add(string.Format("Drive supports writing at is {0} Kbyte/sec. in pure CAV mode",
|
||||
descriptor.WriteSpeed));
|
||||
|
||||
if(mode.TestWrite) mmcOneValue.Add("Drive supports test writing");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user