Files
ReLibreHardwareMonitor/Hardware/RAM/RAMGroup.cs
T
Michal 5d89cdc43d Cleanup around base collection types. (#59)
* Hardware in IGroup is now IEnumerable. No point to call ToArray each time.

* Use ValueTuple insead of custom pair.

* ListSet -> HashSet

* Ring Collection -> List

* ReadOnlyArray -> ReadOnlyList
2018-10-30 14:44:41 +01:00

43 lines
1019 B
C#

/*
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (C) 2012-2013 Michael Möller <mmoeller@openhardwaremonitor.org>
*/
using System;
using System.Collections.Generic;
namespace OpenHardwareMonitor.Hardware.RAM {
internal class RAMGroup : IGroup {
private Hardware[] hardware;
public RAMGroup(SMBIOS smbios, ISettings settings) {
// No implementation for RAM on Unix systems
if (Software.OperatingSystem.IsLinux) {
hardware = new Hardware[0];
return;
}
hardware = new Hardware[] { new GenericRAM("Generic Memory", settings) };
}
public string GetReport() {
return null;
}
public IEnumerable<IHardware> Hardware => hardware;
public void Close() {
foreach (Hardware ram in hardware)
ram.Close();
}
}
}