mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-09-02 15:25:22 +00:00
Refactored the hardware code and added the visitor pattern for operations on the computer/hardware/sensor/parameter tree.
This commit is contained in:
@@ -205,5 +205,14 @@ namespace OpenHardwareMonitor.Hardware {
|
||||
public float Value { get { return value; } }
|
||||
public DateTime Time { get { return time; } }
|
||||
}
|
||||
|
||||
public void Accept(IVisitor visitor) {
|
||||
visitor.VisitSensor(this);
|
||||
}
|
||||
|
||||
public void Traverse(IVisitor visitor) {
|
||||
foreach (IParameter parameter in parameters)
|
||||
parameter.Accept(visitor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user