Version 3.0.340

This commit is contained in:
Anja 2022-09-20 13:51:55 +02:00
parent 52c9f6f1d9
commit bad07e1ec9
62 changed files with 1401 additions and 1000 deletions

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using TINK.Model.Connector;
@ -53,39 +53,32 @@ namespace TINK.Model.Bikes.BikeInfoNS.BluetoothLock
public bool IsGuidValid => Guid != TextToLockItTypeHelper.INVALIDLOCKGUID;
public override bool Equals(object obj) => this.Equals(obj as LockInfo);
public override bool Equals(object obj)
=> Equals(obj as LockInfo);
public bool Equals(LockInfo other)
{
if (Object.ReferenceEquals(other, null)) return false;
if (Object.ReferenceEquals(this, other)) return true;
if (this.GetType() != other.GetType()) return false;
if (ReferenceEquals(other, null)) return false;
if (ReferenceEquals(this, other)) return true;
if (GetType() != other.GetType()) return false;
return ToString() == other.ToString();
}
public override int GetHashCode()
{
return ToString().GetHashCode();
}
public override int GetHashCode() => ToString().GetHashCode();
public override string ToString()
{
return JsonConvert.SerializeObject(this);
}
public override string ToString() => JsonConvert.SerializeObject(this);
public static bool operator ==(LockInfo lhs, LockInfo rhs)
{
if (Object.ReferenceEquals(lhs, null))
return Object.ReferenceEquals(rhs, null) ? true /*null == null = true*/: false;
if (ReferenceEquals(lhs, null))
return ReferenceEquals(rhs, null) ? true /*null == null = true*/: false;
return lhs.Equals(rhs);
}
public static bool operator !=(LockInfo lhs, LockInfo rhs)
{
return !(lhs == rhs);
}
=> !(lhs == rhs);
public class Builder
{
@ -127,6 +120,5 @@ namespace TINK.Model.Bikes.BikeInfoNS.BluetoothLock
return LockInfo;
}
}
}
}