namespace adas_core.Domain.Models.Observations;
///
/// Represents an observation that is associated with string data, extending the base Observation type.
///
///
/// This class specializes the Observation concept for textual or string-based content, inheriting the core observation behavior from its parent class.
///
public class StringObservation : Observation
{
public string Value { get; set; } = string.Empty;
///
/// Creates a from the first in the provided list.
/// Returns null when the list is empty.
///
/// The list of instances to convert.
/// A populated with the string value of the first observation, or null if the list contains no elements.
public static StringObservation? From(List obs)
{
if (obs.Count > 0)
return new StringObservation
{
Value = (string)obs[0].Value
};
return null;
}
}