Replace Storage implementation with CrystalDiskInfo based implementation (#2015)

* Replace Storage implementation with CrystalDiskInfo based implementation.

* Formatting.

* Code review.

* Code review.

* Increase space for attribute name in report.

* Implement dynamic disk handling for usage sensor.

Disable unused warnings.

* Further cleanup in NativeMethods.txt and referenced.
This commit is contained in:
Blacktempel
2025-11-08 10:53:43 +01:00
committed by GitHub
parent 517794ce53
commit c542e856d4
39 changed files with 2247 additions and 3799 deletions
@@ -6,40 +6,10 @@ namespace LibreHardwareMonitor.Interop;
internal static class ByteExtensions
{
public static byte[] ToArray(this __byte_2 bytes)
{
return bytes.AsReadOnlySpan().ToArray();
}
public static byte[] ToArray(this __byte_3 bytes)
{
return bytes.AsReadOnlySpan().ToArray();
}
public static byte[] ToArray(this __byte_4 bytes)
{
return bytes.AsReadOnlySpan().ToArray();
}
public static byte[] ToArray(this __byte_8 bytes)
{
return bytes.AsReadOnlySpan().ToArray();
}
public static byte[] ToArray(this __byte_16 bytes)
{
return bytes.AsReadOnlySpan().ToArray();
}
public static byte[] ToArray(this __byte_20 bytes)
{
return bytes.AsReadOnlySpan().ToArray();
}
public static byte[] ToArray(this __byte_40 bytes)
{
return bytes.AsReadOnlySpan().ToArray();
}
}
#endif