mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 10:36:30 +01:00
13 lines
447 B
C#
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;
|
|
}
|
|
}
|