Version 3.0.338

This commit is contained in:
Anja Müller-Meißner 2022-09-06 16:08:19 +02:00 committed by Anja
parent 573fe77e12
commit 0468955d49
751 changed files with 62747 additions and 60672 deletions

View file

@ -1,7 +1,7 @@
namespace TINK.Services.BluetoothLock.Exception
{
public class AlreadyConnectedException : System.Exception
{
public AlreadyConnectedException() : base("Invalid reconnect call detected. Device is already connected.") { }
}
public class AlreadyConnectedException : System.Exception
{
public AlreadyConnectedException() : base("Invalid reconnect call detected. Device is already connected.") { }
}
}

View file

@ -1,8 +1,8 @@
namespace TINK.Services.BluetoothLock.Exception
{
public class AuthKeyException : System.Exception
{
public AuthKeyException(string message) : base(message)
{ }
}
public class AuthKeyException : System.Exception
{
public AuthKeyException(string message) : base(message)
{ }
}
}

View file

@ -2,17 +2,17 @@
namespace TINK.Services.BluetoothLock.Exception
{
/// <summary>
/// If fired if app is disconnected from bluetooth.
/// </summary>
/// <remarks>
/// Member to determine if app is disconnected: IDevice.State from server Plugin.BLE. If DeviceState.Disconnected exception is fired.
/// All possible states: Disconnected, Connecting, Connected, Limited.
/// </remarks>
public class BluetoothDisconnectedException : StateAwareException
{
public BluetoothDisconnectedException() : base(LockingState.UnknownDisconnected, MultilingualResources.Resources.ErrorBluetoothDisconnectedException)
{
}
}
/// <summary>
/// If fired if app is disconnected from bluetooth.
/// </summary>
/// <remarks>
/// Member to determine if app is disconnected: IDevice.State from server Plugin.BLE. If DeviceState.Disconnected exception is fired.
/// All possible states: Disconnected, Connecting, Connected, Limited.
/// </remarks>
public class BluetoothDisconnectedException : StateAwareException
{
public BluetoothDisconnectedException() : base(LockingState.UnknownDisconnected, MultilingualResources.Resources.ErrorBluetoothDisconnectedException)
{
}
}
}

View file

@ -3,15 +3,15 @@ using TINK.MultilingualResources;
namespace TINK.Services.BluetoothLock.Exception
{
/// <summary> Exception which is fired when bluetooth is not on. </summary>
/// <remarks>
/// Member to determine if app is disconnected: IBluetoothLE.State from server Plugin.BLE. If current value is not BluetoothState.On exception is fired.
/// All possible states: Unknown, Unavailable, Unauthorized, TurningOn, On, TurningOff, Off.
/// </remarks>
public class ConnectBluetoothNotOnException : System.Exception
{
public ConnectBluetoothNotOnException() : base(Resources.ErrorConnectLockBluetoothOffException) { }
/// <summary> Exception which is fired when bluetooth is not on. </summary>
/// <remarks>
/// Member to determine if app is disconnected: IBluetoothLE.State from server Plugin.BLE. If current value is not BluetoothState.On exception is fired.
/// All possible states: Unknown, Unavailable, Unauthorized, TurningOn, On, TurningOff, Off.
/// </remarks>
public class ConnectBluetoothNotOnException : System.Exception
{
public ConnectBluetoothNotOnException() : base(Resources.ErrorConnectLockBluetoothOffException) { }
public ConnectBluetoothNotOnException(object state) : base(string.Format(Resources.ErrorConnectLockBluetoothNotOnException, state.ToString())) { }
}
public ConnectBluetoothNotOnException(object state) : base(string.Format(Resources.ErrorConnectLockBluetoothNotOnException, state.ToString())) { }
}
}

View file

@ -2,8 +2,8 @@
namespace TINK.Services.BluetoothLock.Exception
{
public class ConnectLocationOffException : System.Exception
{
public ConnectLocationOffException() : base(Resources.ErrorConnectLockLocationOffException) { }
}
public class ConnectLocationOffException : System.Exception
{
public ConnectLocationOffException() : base(Resources.ErrorConnectLockLocationOffException) { }
}
}

View file

@ -2,8 +2,8 @@
namespace TINK.Services.BluetoothLock.Exception
{
public class ConnectLocationPermissionMissingException : System.Exception
{
public ConnectLocationPermissionMissingException() : base(Resources.ErrorConnectLockLocationPermissingMissingException) { }
}
public class ConnectLocationPermissionMissingException : System.Exception
{
public ConnectLocationPermissionMissingException() : base(Resources.ErrorConnectLockLocationPermissingMissingException) { }
}
}

View file

@ -2,12 +2,12 @@
namespace TINK.Services.BluetoothLock.Exception
{
public class CouldntCloseBoldBlockedException : StateAwareException
{
public CouldntCloseBoldBlockedException() : base(
LockingState.UnknownFromHardwareError, // Lock is closed in most cases, but this is not guaranteed according to haveltec.
MultilingualResources.Resources.ErrorCloseLockBoldBlocked)
{
}
}
public class CouldntCloseBoldBlockedException : StateAwareException
{
public CouldntCloseBoldBlockedException() : base(
LockingState.UnknownFromHardwareError, // Lock is closed in most cases, but this is not guaranteed according to haveltec.
MultilingualResources.Resources.ErrorCloseLockBoldBlocked)
{
}
}
}

View file

@ -4,15 +4,15 @@ using TINK.MultilingualResources;
namespace TINK.Services.BluetoothLock.Exception
{
public class CouldntCloseInconsistentStateExecption : StateAwareException
{
public CouldntCloseInconsistentStateExecption(LockingState state) :
base(
state,
state != LockingState.UnknownFromHardwareError
? string.Format(Resources.ErrorCloseLockUnexpectedState, state)
: Resources.ErrorCloseLockUnknownPosition)
{
}
}
public class CouldntCloseInconsistentStateExecption : StateAwareException
{
public CouldntCloseInconsistentStateExecption(LockingState state) :
base(
state,
state != LockingState.UnknownFromHardwareError
? string.Format(Resources.ErrorCloseLockUnexpectedState, state)
: Resources.ErrorCloseLockUnknownPosition)
{
}
}
}

View file

@ -2,12 +2,12 @@
namespace TINK.Services.BluetoothLock.Exception
{
public class CouldntCloseMovingException : StateAwareException
{
public CouldntCloseMovingException() : base(
LockingState.Open, // Locking bold is probable (according to haveltec) still open.
MultilingualResources.Resources.ErrorCloseLockBikeMoving)
{
}
}
public class CouldntCloseMovingException : StateAwareException
{
public CouldntCloseMovingException() : base(
LockingState.Open, // Locking bold is probable (according to haveltec) still open.
MultilingualResources.Resources.ErrorCloseLockBikeMoving)
{
}
}
}

View file

@ -2,15 +2,15 @@
namespace TINK.Services.BluetoothLock.Exception
{
/// <summary>
/// Lock can not be opened, because bold is blocked. Lock reports that obstacle is still blocking.
/// </summary>
public class CouldntOpenBoldIsBlockedException : StateAwareException
{
public CouldntOpenBoldIsBlockedException() : base(
LockingState.UnknownFromHardwareError,
MultilingualResources.Resources.ErrorOpenLockBoldBlocked)
{
}
}
/// <summary>
/// Lock can not be opened, because bold is blocked. Lock reports that obstacle is still blocking.
/// </summary>
public class CouldntOpenBoldIsBlockedException : StateAwareException
{
public CouldntOpenBoldIsBlockedException() : base(
LockingState.UnknownFromHardwareError,
MultilingualResources.Resources.ErrorOpenLockBoldBlocked)
{
}
}
}

View file

@ -2,15 +2,15 @@
namespace TINK.Services.BluetoothLock.Exception
{
/// <summary>
/// Lock can not be opened, because bold is/ was blocked. Obstacle might no more block but lock could not be opened completely to obstacle.
/// </summary>
public class CouldntOpenBoldWasBlockedException : StateAwareException
{
public CouldntOpenBoldWasBlockedException() : base(
LockingState.UnknownFromHardwareError,
MultilingualResources.Resources.ErrorOpenLockBoldWasBlocked)
{
}
}
/// <summary>
/// Lock can not be opened, because bold is/ was blocked. Obstacle might no more block but lock could not be opened completely to obstacle.
/// </summary>
public class CouldntOpenBoldWasBlockedException : StateAwareException
{
public CouldntOpenBoldWasBlockedException() : base(
LockingState.UnknownFromHardwareError,
MultilingualResources.Resources.ErrorOpenLockBoldWasBlocked)
{
}
}
}

View file

@ -4,13 +4,13 @@ using TINK.MultilingualResources;
namespace TINK.Services.BluetoothLock.Exception
{
public class CouldntOpenInconsistentStateExecption : StateAwareException
{
public CouldntOpenInconsistentStateExecption(LockingState state) :
base(
state,
string.Format(Resources.ErrorOpenLockUnexpectedState, state))
{
}
}
public class CouldntOpenInconsistentStateExecption : StateAwareException
{
public CouldntOpenInconsistentStateExecption(LockingState state) :
base(
state,
string.Format(Resources.ErrorOpenLockUnexpectedState, state))
{
}
}
}

View file

@ -1,8 +1,8 @@
namespace TINK.Services.BluetoothLock.Exception
{
public class CoundntGetCharacteristicException : System.Exception
{
public CoundntGetCharacteristicException(string message) : base(message)
{ }
}
public class CoundntGetCharacteristicException : System.Exception
{
public CoundntGetCharacteristicException(string message) : base(message)
{ }
}
}

View file

@ -1,9 +1,9 @@
namespace TINK.Services.BluetoothLock.Exception
{
public class GuidUnknownException : System.Exception
{
public GuidUnknownException() : base("Can not connect to lock. No Guid available.")
{
}
}
public class GuidUnknownException : System.Exception
{
public GuidUnknownException() : base("Can not connect to lock. No Guid available.")
{
}
}
}

View file

@ -1,8 +1,8 @@
namespace TINK.Services.BluetoothLock.Exception
{
/// <summary> Thrown whenever lock is out of reach.</summary>
/// <remarks> If fired when scan for devices does not result in lock beeing found.</remarks>
public class OutOfReachException : System.Exception
{
}
/// <summary> Thrown whenever lock is out of reach.</summary>
/// <remarks> If fired when scan for devices does not result in lock beeing found.</remarks>
public class OutOfReachException : System.Exception
{
}
}

View file

@ -2,14 +2,14 @@
namespace TINK.Services.BluetoothLock.Exception
{
public abstract class StateAwareException : System.Exception
{
public StateAwareException(LockingState state, string description) : base(description)
{
State = state;
}
public abstract class StateAwareException : System.Exception
{
public StateAwareException(LockingState state, string description) : base(description)
{
State = state;
}
/// <summary> Holds the state reported by lock.</summary>
public LockingState State { get; }
}
/// <summary> Holds the state reported by lock.</summary>
public LockingState State { get; }
}
}