Class StorageMeasurement
Handles storage and retrieval of measurements using JSON serialization.
public class StorageMeasurement
- Inheritance
-
StorageMeasurement
- Inherited Members
Constructors
StorageMeasurement(string)
Initializes a new instance of the StorageMeasurement class, optionally loading from a file.
public StorageMeasurement(string filename = "")
Parameters
filename
stringOptional filename to load measurements from.
Properties
Count
Gets the number of stored measurements.
public int Count { get; }
Property Value
this[int]
Gets the StorageMeasurementEntry at the specified index.
public StorageMeasurementEntry this[int index] { get; }
Parameters
index
intThe zero-based index of the measurement entry to retrieve.
Property Value
- StorageMeasurementEntry
The StorageMeasurementEntry located at the given index in the measurement list.
Exceptions
- ArgumentOutOfRangeException
Thrown when
index
is less than 0 or greater than or equal to the number of stored entries.
data
Raw JSON structure representing all stored measurement data. This node may contain measurements, results, metadata, logging, and other associated entries.
public JsonNode data { get; }
Property Value
Methods
Append(Measurement, string, List<string>?, Verification?)
Appends a measurement to storage.
public void Append(Measurement measurement, string comment = "", List<string>? logging = null, Verification? verification = null)
Parameters
measurement
MeasurementThe measurement to append.
comment
stringAn optional comment for the measurement.
logging
List<string>Optional logging information.
verification
VerificationOptional verification information.
AppendWithResults(Measurement, Results, string, List<string>?, Verification?)
Appends a measurement and the results to storage.
public void AppendWithResults(Measurement measurement, Results results, string comment = "", List<string>? logging = null, Verification? verification = null)
Parameters
measurement
MeasurementThe measurement to append.
results
ResultsThe results to append.
comment
stringAn optional comment for the measurement.
logging
List<string>Optional logging information.
verification
VerificationOptional verification information.
Measurements()
Retrieves the list of stored measurements.
public List<Measurement> Measurements()
Returns
- List<Measurement>
A list of Measurement objects.
Results()
Retrieves the list of stored results.
public List<Results> Results()
Returns
- List<Results>
A list of Measurement objects.
Save(string)
Saves the measurement data to a specified file.
public void Save(string filename)
Parameters
filename
stringThe filename to save data to.