mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 10:36:30 +01:00
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
|
|
namespace TINK.Repository.Request
|
|
{
|
|
public static class QueryBuilderHelper
|
|
{
|
|
/// <summary>
|
|
/// Gets the htlm query string element for session id.
|
|
/// </summary>
|
|
/// <returns>Query string.</returns>
|
|
public static string GetSessionIdQueryElement(
|
|
string op,
|
|
string merchantId,
|
|
string sessionCookie = null)
|
|
=> !string.IsNullOrEmpty(merchantId) || !string.IsNullOrEmpty(sessionCookie)
|
|
? $"{op}sessionid={(!string.IsNullOrEmpty(sessionCookie) ? sessionCookie : string.Empty)}{(!string.IsNullOrEmpty(merchantId) ? merchantId : string.Empty)}"
|
|
: string.Empty;
|
|
|
|
/// <summary>
|
|
/// Gets the htlm query string element for the language.
|
|
/// </summary>
|
|
/// <param name="uiIsoLangugageName">Two letter ISO language name.</param>
|
|
/// <returns>Query string.</returns>
|
|
public static string GetLanguageQueryElement(string op, string uiIsoLangugageName)
|
|
=> !string.IsNullOrEmpty(uiIsoLangugageName)
|
|
? $"{op}lang={uiIsoLangugageName}"
|
|
: string.Empty;
|
|
}
|
|
}
|