Class Results
Represents the results the concentration measurement.
public class Results : IEquatable<Results>, IJsonSerializable
- Inheritance
-
Results
- Implements
- Inherited Members
Constructors
Results(double)
Initializes a new instance of the Results class with specified concentration.
public Results(double concentration)
Parameters
concentration
doubleThe unit of the concentration depends on the used standard high.
Properties
Concentration
Gets or sets the concentration. The unit of the concentration depends on the used standard high.
public double Concentration { get; set; }
Property Value
Methods
Equals(Results?)
Determines whether the specified object is equal to the current instance.
public bool Equals(Results? other)
Parameters
other
ResultsThe object to compare with the current instance.
Returns
- bool
true
if the objects are equal; otherwise,false
.
Equals(object?)
Determines whether the specified object is equal to the current instance.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true
if the objects are equal; otherwise,false
.
FromJson(JsonNode?)
Creates a Results instance from a JSON representation.
public static Results FromJson(JsonNode? node)
Parameters
node
JsonNodeThe JSON node containing the nucleic acid data.
Returns
Exceptions
- ArgumentNullException
Thrown if the provided JSON node is null.
- InvalidOperationException
Thrown if required fields are missing or null.
GetHashCode()
Returns a hash code for the current Measurement instance.
public override int GetHashCode()
Returns
- int
An integer hash code based on the air and sample measurements, as well as the optional comment.
Remarks
This override ensures that instances with the same measurement data produce the same hash code, which is particularly important when using this class in hash-based collections like dictionaries or hash sets.
ToJson()
Converts the current instance to a JSON representation.
public JsonNode ToJson()
Returns
ToString()
Returns a string representation of the results.
public override string ToString()
Returns
- string
A formatted string with the concentration