mirror of
https://github.com/ckaczor/WeatherService.git
synced 2026-02-11 02:32:39 -05:00
Initial commit
This commit is contained in:
26
Values/RainReading.cs
Normal file
26
Values/RainReading.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace WeatherService.Values
|
||||
{
|
||||
[DataContract]
|
||||
public class RainReading : ReadingBase
|
||||
{
|
||||
public RainReading(WeatherValueType valueType) : base(valueType)
|
||||
{
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public double Millimeters
|
||||
{
|
||||
get { return Value; }
|
||||
set { Value = value; }
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public double Inches
|
||||
{
|
||||
get { return Conversion.ConvertLength(Value, LengthUnit.Millimeters, LengthUnit.Inches); }
|
||||
set { Value = Conversion.ConvertLength(value, LengthUnit.Inches, LengthUnit.Millimeters); }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user