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

14 lines
453 B
C#
Raw Normal View History

2024-04-09 12:53:23 +02:00
namespace ShareeBike.Model.State
2022-08-30 15:42:25 +02:00
{
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
}