public DevicePower(PowerChargeLevel powerLevel, DateTime remainingCharge) { RemainingChargeTime = remainingCharge; PowerLevel = powerLevel; }
/// <summary> /// Serialization constructor used for deserialization /// </summary> /// <param name="info">The serialization info</param> /// <param name="context">The context of the stream</param> protected DevicePower(SerializationInfo info, StreamingContext context) { RemainingChargeTime = (Nullable <DateTime>)info.GetValue("RemainingChargeTime", typeof(Nullable <DateTime>)); PowerLevel = (PowerChargeLevel)info.GetValue("PowerLevel", typeof(PowerChargeLevel)); }
public DevicePower() { RemainingChargeTime = null; PowerLevel = PowerChargeLevel.Unknown; }