sharee.bike-App/TINKLib/Repository/Request/RequestBuilderHelper.cs

34 lines
733 B
C#
Raw Normal View History

2022-12-27 21:08:09 +01:00
using TINK.Model.Connector;
2022-08-30 15:42:25 +02:00
namespace TINK.Repository.Request
{
2022-09-06 16:08:19 +02:00
public static class RequestBuilderHelper
{
/// <summary>
/// Gets the REST language parameter.
/// </summary>
/// <param name="uiIsoLangugageName">Two letter ISO language name.</param>
/// <returns></returns>
public static string GetLanguageParameter(string uiIsoLangugageName)
=> !string.IsNullOrEmpty(uiIsoLangugageName)
? $"&lang={uiIsoLangugageName}"
: string.Empty;
2022-12-27 21:08:09 +01:00
public static lock_state? GetLockState(this LockingAction? action)
{
switch (action)
{
case LockingAction.Open:
return lock_state.unlocking;
case LockingAction.Close:
return lock_state.locking;
default:
return null;
}
}
2022-09-06 16:08:19 +02:00
}
2022-08-30 15:42:25 +02:00
}