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