2010-10-16 18:24:20 +00:00
|
|
|
|
/*
|
|
|
|
|
|
2012-05-27 14:23:31 +00:00
|
|
|
|
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/.
|
2010-10-16 18:24:20 +00:00
|
|
|
|
|
2012-05-27 14:23:31 +00:00
|
|
|
|
Copyright (C) 2009-2010 Paul Werelds <paul@werelds.net>
|
|
|
|
|
|
2010-10-16 18:24:20 +00:00
|
|
|
|
*/
|
|
|
|
|
|
2012-05-27 14:23:31 +00:00
|
|
|
|
|
2010-10-16 18:24:20 +00:00
|
|
|
|
using System.Management.Instrumentation;
|
|
|
|
|
using OpenHardwareMonitor.Hardware;
|
|
|
|
|
|
2010-10-17 08:21:33 +00:00
|
|
|
|
namespace OpenHardwareMonitor.WMI {
|
2010-10-16 18:24:20 +00:00
|
|
|
|
[InstrumentationClass(InstrumentationType.Instance)]
|
|
|
|
|
public class Hardware : IWmiObject {
|
|
|
|
|
#region WMI Exposed
|
|
|
|
|
|
|
|
|
|
public string HardwareType { get; private set; }
|
|
|
|
|
public string Identifier { get; private set; }
|
|
|
|
|
public string Name { get; private set; }
|
2010-10-18 07:15:31 +00:00
|
|
|
|
public string Parent { get; private set; }
|
2010-10-16 18:24:20 +00:00
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
public Hardware(IHardware hardware) {
|
|
|
|
|
Name = hardware.Name;
|
|
|
|
|
Identifier = hardware.Identifier.ToString();
|
|
|
|
|
HardwareType = hardware.HardwareType.ToString();
|
2010-10-18 07:18:14 +00:00
|
|
|
|
Parent = (hardware.Parent != null)
|
|
|
|
|
? hardware.Parent.Identifier.ToString()
|
|
|
|
|
: "";
|
2010-10-16 18:24:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Update() { }
|
|
|
|
|
}
|
|
|
|
|
}
|