sharee.bike-App/TINKLib/Repository/Request/RequestBuilderHelper.cs
2022-12-27 21:08:09 +01:00

33 lines
733 B
C#

using TINK.Model.Connector;
namespace TINK.Repository.Request
{
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;
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;
}
}
}
}