Skip to content

Commit

Permalink
Version 10.0.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Urban committed Feb 3, 2022
1 parent 83190a9 commit b5e1512
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Hardware.Info.Benchmark/Hardware.Info.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8.0</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions Hardware.Info.Test/Hardware.Info.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8.0</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion Hardware.Info/Hardware.Info.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PropertyGroup>
<PackageId>Hardware.Info</PackageId>
<Product>Hardware.Info</Product>
<Version>1.1.1.1</Version>
<Version>10.0.0.0</Version>
<Authors>Jinjinov</Authors>
<Description>Battery, BIOS, CPU - processor, storage drive, keyboard, RAM - memory, monitor, motherboard, mouse, NIC - network adapter, printer, sound card - audio card, graphics card - video card. Hardware.Info is a .NET Standard 2.0 library and uses WMI on Windows, /dev, /proc, /sys on Linux and sysctl, system_profiler on macOS.</Description>
<PackageTags>Computer;Device;Hardware;Info;Information;NET Standard;Windows;Linux;macOS</PackageTags>
Expand Down
16 changes: 9 additions & 7 deletions Hardware.Info/Linux/HardwareInfoRetrieval.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ public override List<Drive> GetDriveList()

foreach (string line in lines)
{
if (line.StartsWith("*-"))
string trimmed = line.Trim();

if (trimmed.StartsWith("*-"))
{
if (disk != null)
{
Expand All @@ -286,21 +288,21 @@ public override List<Drive> GetDriveList()
disk = null;
}

if (line.StartsWith("*-disk:"))
if (trimmed.StartsWith("*-cdrom") || trimmed.StartsWith("*-disk"))
{
disk = new Drive();
continue;
}

if (disk != null)
{
if (line.StartsWith("product:"))
if (trimmed.StartsWith("product:"))
{
disk.Model = disk.Caption = line.Replace("product:", string.Empty).Trim();
disk.Model = disk.Caption = trimmed.Replace("product:", string.Empty).Trim();
}
else if (line.StartsWith("vendor:"))
else if (trimmed.StartsWith("vendor:"))
{
disk.Manufacturer = line.Replace("vendor:", string.Empty).Trim();
disk.Manufacturer = trimmed.Replace("vendor:", string.Empty).Trim();
}
}
}
Expand Down Expand Up @@ -346,7 +348,7 @@ public List<Memory> GetMemoryList()
{
string relevant = split[1].Trim();

if (relevant.Contains("DDR") || relevant.Contains("DIMM"))
if (relevant.Contains("DDR") || relevant.Contains("DIMM") || relevant.Contains("System"))
{
Memory ram = new Memory();

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Battery, BIOS, CPU - processor, storage drive, keyboard, RAM - memory, monitor,
1. Include NuGet package from https://www.nuget.org/packages/Hardware.Info

<ItemGroup>
<PackageReference Include="Hardware.Info" Version="1.1.1.1" />
<PackageReference Include="Hardware.Info" Version="10.0.0.0" />
</ItemGroup>

2. Call `RefreshAll()` or one of the other `Refresh*()` methods:
Expand Down Expand Up @@ -180,6 +180,8 @@ Setting `includeNetworkAdapterConfiguration` to `false` has only a small impact

## Version history:

- 10.0.0.0:
- Fixed `GetDriveList()` and `GetMemoryList()` in Linux - thanks to [@misaka00251](https://github.com/misaka00251)
- 1.1.1.1:
- Added `Memory.BankLabel`, `Memory.MinVoltage`, `Memory.MaxVoltage` in Windows - by [@AathifMahir](https://github.com/AathifMahir)
- Added `CPU.SocketDesignation`, `CPU.SecondLevelAddressTranslationExtensions` in Windows - by [@AathifMahir](https://github.com/AathifMahir)
Expand Down

0 comments on commit b5e1512

Please sign in to comment.