mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 10:36:30 +01:00
30 lines
907 B
C#
30 lines
907 B
C#
namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
|
{
|
|
public class LockInfoMutable : ILockInfoMutable
|
|
{
|
|
/// <summary> Lock info object. </summary>
|
|
private LockInfo LockInfo { get; set; }
|
|
|
|
/// <summary> Constructs a bluetooth lock info object. </summary>
|
|
/// <param name="id">Id of lock must always been known when constructing an lock info object.</param>
|
|
public LockInfoMutable(LockingState state)
|
|
{
|
|
LockInfo = new LockInfo.Builder() { State = state }.Build();
|
|
}
|
|
|
|
public LockingState State
|
|
{
|
|
get => LockInfo.State;
|
|
set => LockInfo = new LockInfo.Builder(LockInfo) { State = value }.Build();
|
|
}
|
|
|
|
/// <summary> Holds the percentage of lock battery.</summary>
|
|
public double BatteryPercentage { get; set; } = double.NaN;
|
|
|
|
/// <summary> Loads lock info object from values. </summary>
|
|
public void Load()
|
|
{
|
|
LockInfo = new LockInfo.Builder(LockInfo) { }.Build();
|
|
}
|
|
}
|
|
}
|