public static MeasurementItem Create(MeasurementItemType type, DateTime fromDateTime, DateTime tillDateTime, List <MeasurementValue> values, List <AirQualityIndex> indexes, List <AirQualityStandard> standards) => new MeasurementItem(null, type, fromDateTime, tillDateTime, values, indexes, standards);
internal static MeasurementItem FromApi(ApiMeasurementItem item, MeasurementItemType type) => MeasurementItem.Create(type, item.FromDateTime, item.TillDateTime, item.Values.Select(AirlyApiMeasurementValueAdapter.FromApi).ToList(), item.Indexes.Select(AirlyApiQualityIndexApiAdapter.FromApi).ToList(), item.Standards.Select(AirlyApiQualityStandardApiAdapter.FromApi).ToList());
public MeasurementItem(long?id, MeasurementItemType type, DateTime fromDateTime, DateTime tillDateTime, List <MeasurementValue> values, List <AirQualityIndex> indexes, List <AirQualityStandard> standards) { Id = id; Type = type; FromDateTime = fromDateTime; TillDateTime = tillDateTime; Values = values; Indexes = indexes; Standards = standards; }