using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace WisdomClient.data { public class TsData { public long ts { get; set; } public short status { get; set; } public double? doubleValue { get; set; } public bool? booleanValue { get; set; } public long? longValue { get; set; } public String stringValue { get; set; } public String blobValue { get; set; } public Coordinate coordinateValue { get; set; } public String getValue() { if (doubleValue.HasValue) return doubleValue.ToString(); else if (booleanValue.HasValue) return booleanValue.ToString(); else if (longValue.HasValue) return longValue.ToString(); else if (stringValue != null) return stringValue; else if (blobValue != null) return blobValue; else if (coordinateValue != null) return coordinateValue.ToString(); return "invalid value"; } public override string ToString() { return String.Format("ts={0}, value={1}", ts, this.getValue()); } } }