From a7d45d22b16e9817d36bf1a8405ea59302ee2f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=B6ller?= Date: Thu, 26 May 2016 15:45:10 +0200 Subject: [PATCH] Corrected the source code format. --- Hardware/HDD/SSDPlextor.cs | 27 ++++++++++++++------------- Hardware/HDD/SSDSamsung.cs | 6 ++++-- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Hardware/HDD/SSDPlextor.cs b/Hardware/HDD/SSDPlextor.cs index 9a8a314..02ed57c 100644 --- a/Hardware/HDD/SSDPlextor.cs +++ b/Hardware/HDD/SSDPlextor.cs @@ -8,30 +8,31 @@ */ -using OpenHardwareMonitor.Collections; +namespace OpenHardwareMonitor.Hardware.HDD { + using System.Collections.Generic; + using OpenHardwareMonitor.Collections; -namespace OpenHardwareMonitor.Hardware.HDD -{ - using System.Collections.Generic; - - [NamePrefix("PLEXTOR")] + [NamePrefix("PLEXTOR")] internal class SSDPlextor : AbstractHarddrive { private static readonly IEnumerable smartAttributes = new List { new SmartAttribute(0x09, SmartNames.PowerOnHours, RawToInt), new SmartAttribute(0x0C, SmartNames.PowerCycleCount, RawToInt), - new SmartAttribute(0xF1, SmartNames.HostWrites, RawToGb, SensorType.Data, 0, SmartNames.HostWrites), - new SmartAttribute(0xF2, SmartNames.HostReads, RawToGb, SensorType.Data, 1, SmartNames.HostReads), + new SmartAttribute(0xF1, SmartNames.HostWrites, RawToGb, SensorType.Data, + 0, SmartNames.HostWrites), + new SmartAttribute(0xF2, SmartNames.HostReads, RawToGb, SensorType.Data, + 1, SmartNames.HostReads), }; - public SSDPlextor(ISmart smart, string name, string firmwareRevision, + public SSDPlextor(ISmart smart, string name, string firmwareRevision, int index, ISettings settings) : base(smart, name, firmwareRevision, index, smartAttributes, settings) {} - private static float RawToGb(byte[] rawvalue, byte value, IReadOnlyArray parameters) - { - return RawToInt(rawvalue, value, parameters) / 32; - } + private static float RawToGb(byte[] rawvalue, byte value, + IReadOnlyArray parameters) + { + return RawToInt(rawvalue, value, parameters) / 32; } + } } diff --git a/Hardware/HDD/SSDSamsung.cs b/Hardware/HDD/SSDSamsung.cs index cb2f339..b260079 100644 --- a/Hardware/HDD/SSDSamsung.cs +++ b/Hardware/HDD/SSDSamsung.cs @@ -50,9 +50,11 @@ namespace OpenHardwareMonitor.Hardware.HDD { new SmartAttribute(0xC9, SmartNames.SupercapStatus), new SmartAttribute(0xCA, SmartNames.ExceptionModeStatus), new SmartAttribute(0xEB, SmartNames.PowerRecoveryCount), - new SmartAttribute(0xF1, SmartNames.TotalLBAWritten, (byte[] r, byte v, IReadOnlyArray p) + new SmartAttribute(0xF1, SmartNames.TotalLBAWritten, + (byte[] r, byte v, IReadOnlyArray p) => { return RawToInt(r, v, p) * 512 / 1024 / 1024 / 1024; }, - SensorType.Data, 0, SmartNames.TotalLBAWritten) }; + SensorType.Data, 0, SmartNames.TotalLBAWritten) + }; public SSDSamsung(ISmart smart, string name, string firmwareRevision, int index, ISettings settings)