public static ReadOnlyMultilevelSensorState <TMeasurement> CopyFrom(IMultilevelSensorState <TMeasurement> source)
        {
            var result = new ReadOnlyMultilevelSensorState <TMeasurement>
            {
                Value     = source.Value,
                TimeStamp = source.TimeStamp
            };

            return(result);
        }
        public static ReadOnlyMultilevelSensorState <TMeasurement> FromXElement(XElement element)
        {
            var value = element.GetAttributeMeasurementValue <TMeasurement>("Value");

            var timeStamp = element.GetAttributeDateTimeValue("TimeStamp");

            var result = new ReadOnlyMultilevelSensorState <TMeasurement>
            {
                Value     = value,
                TimeStamp = timeStamp
            };

            return(result);
        }
예제 #3
0
 public static ReadOnlyMultilevelSensorState <TMeasurement> Copy <TMeasurement>(
     this IMultilevelSensorState <TMeasurement> state)
     where TMeasurement : IMeasurement
 {
     return(ReadOnlyMultilevelSensorState <TMeasurement> .CopyFrom(state));
 }
        public static ReadOnlyMultilevelSensorState <TMeasurement> Blank()
        {
            var result = new ReadOnlyMultilevelSensorState <TMeasurement>();

            return(result);
        }
예제 #5
0
 public static ReadOnlyMultilevelSensorState <TMeasurement> ToMultilevelSensor <TMeasurement>(this XElement element)
     where TMeasurement : IMeasurement
 {
     return(ReadOnlyMultilevelSensorState <TMeasurement> .FromXElement(element));
 }