sharee.bike-App/SharedBusinessLogic/Model/State/StateInfoHelper.cs
2024-04-09 12:53:23 +02:00

13 lines
453 B
C#

namespace ShareeBike.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;
}
}