23 lines
608 B
C#
23 lines
608 B
C#
using System;
|
|
using Newtonsoft.Json;
|
|
using Xylem.Common.CommonCore.CommonMeasurementUnits.JsonConverters;
|
|
|
|
namespace Xylem.Common.CommonCore.CommonMeasurementUnits
|
|
{
|
|
[JsonConverter(typeof(TemperatureConverter))]
|
|
public class Temperature : Unit
|
|
{
|
|
public Double Celsius
|
|
{
|
|
get => value;
|
|
set => this.value = value;
|
|
}
|
|
|
|
public static implicit operator Temperature(Double x)
|
|
=> new Temperature { value = x };
|
|
|
|
public static implicit operator Temperature(Double? x)
|
|
=> new Temperature { value = x ?? 0 };
|
|
}
|
|
}
|