sharee.bike-App/TINKLib/Model/State/StateInfoHelper.cs

14 lines
447 B
C#
Raw Normal View History

2022-08-30 15:42:25 +02:00
namespace TINK.Model.State
{
2022-09-06 16:08:19 +02:00
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;
}
2022-08-30 15:42:25 +02:00
}