sharee.bike-App/TINKLib/Model/State/StateInfoHelper.cs
Anja Müller-Meißner 0468955d49 Version 3.0.338
2022-09-08 09:55:14 +02:00

13 lines
447 B
C#

namespace TINK.Model.State
{
public static class StateInfoHelper
{
/// <summary>
/// Gets whether bike is available or occupied, i.e. reserved or booked.
/// </summary>
/// <param name="state">State to be info from.</param>
/// <returns>True if bike is reserved to booked.</returns>
public static bool IsOccupied(this InUseStateEnum state)
=> state != InUseStateEnum.Disposable && state != InUseStateEnum.FeedbackPending;
}
}