Class StorageMeasurementEntry
Represents an entry in the storage measurement system. Contains a measurement, an optional comment, results, and raw JSON data.
public class StorageMeasurementEntry
- Inheritance
-
StorageMeasurementEntry
- Inherited Members
Constructors
StorageMeasurementEntry(Measurement, string?, Results?, JsonNode?)
Initializes a new instance of the StorageMeasurementEntry class.
public StorageMeasurementEntry(Measurement measurement, string? comment = null, Results? results = null, JsonNode? node = null)
Parameters
measurement
MeasurementThe measurement data.
comment
stringAn optional comment.
results
ResultsThe associated results, if available.
node
JsonNodeThe raw JSON node, if available.
Properties
Comment
An optional comment associated with the measurement entry.
public string? Comment { get; set; }
Property Value
Measurement
The stored measurement data.
public Measurement Measurement { get; set; }
Property Value
Node
The raw JSON node representation of the measurement entry.
public JsonNode? Node { get; set; }
Property Value
Results
The calculated results associated with the measurement, if available.
public Results? Results { get; set; }
Property Value
Methods
ApplyResults(Factors)
Applies the calculated results based on given correction factors. Updates the JSON node representation if available.
public void ApplyResults(Factors factors)
Parameters
factors
FactorsThe correction factors to apply.
FromJson(JsonNode)
Creates a StorageMeasurementEntry instance from a JSON node. Parses the measurement, comment, and results data.
public static StorageMeasurementEntry FromJson(JsonNode node)
Parameters
node
JsonNodeThe JSON node containing the measurement entry data.
Returns
- StorageMeasurementEntry
A populated StorageMeasurementEntry instance.
HasResults()
Determines whether the entry contains calculated results.
public bool HasResults()
Returns
- bool
true
if results exist, otherwisefalse
.
ToString()
Returns a string representation of the storage measurement entry.
public override string ToString()
Returns
- string
A formatted string displaying measurement details.