mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-21 21:46:27 +02:00
3.0.275
This commit is contained in:
parent
f38b516d25
commit
578fcee611
70 changed files with 6828 additions and 9625 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using TINK.Model;
|
||||
using TINK.Model.Map;
|
||||
|
||||
namespace TINK.Services.CopriApi
|
||||
|
@ -7,16 +8,18 @@ namespace TINK.Services.CopriApi
|
|||
public class GeneralData
|
||||
{
|
||||
/// <summary> Constructs an empty general data object. </summary>
|
||||
public GeneralData() : this(null, null, null) { }
|
||||
public GeneralData() : this(null, null, null, null) { }
|
||||
|
||||
public GeneralData(
|
||||
IMapSpan initialMapSpan,
|
||||
string merachantMessage,
|
||||
Version apiVersion)
|
||||
Version apiVersion,
|
||||
ResourceUrls resourceUrls)
|
||||
{
|
||||
InitialMapSpan = initialMapSpan ?? MapSpanFactory.Create();
|
||||
MerchantMessage = merachantMessage ?? string.Empty;
|
||||
ApiVersion = apiVersion ?? new Version(0, 0);
|
||||
ResourceUrls = resourceUrls ?? new ResourceUrls();
|
||||
}
|
||||
|
||||
/// <summary> Initial map display area.</summary>
|
||||
|
@ -27,5 +30,8 @@ namespace TINK.Services.CopriApi
|
|||
|
||||
/// <summary> Version of COPRI api. 0.0 if version is not set</summary>
|
||||
public Version ApiVersion { get; private set; }
|
||||
|
||||
/// <summary> Resources (html pages) to be displayed provided by COPRI.</summary>
|
||||
public IResourceUrls ResourceUrls { get; private set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,24 +22,5 @@ namespace TINK.Services.CopriApi.ServerUris
|
|||
? "tinkapp" /* resource tree is more complex for TINK/ konrad*/
|
||||
: "app";
|
||||
|
||||
/// <summary> Get folder name for a static site depending on host name. </summary>
|
||||
/// <param name="hostName">Host name.</param>
|
||||
/// <returns>Folder name.</returns>
|
||||
public static string GetSiteFolderName(this string hostName)
|
||||
=> hostName.GetIsCopri()
|
||||
? "tinkapp" /* resource tree is more complex for TINK/ konrad*/
|
||||
: SHAREE_SILTEFOLDERNAME;
|
||||
|
||||
/// <summary> Get the agb resource name name depending on host name. </summary>
|
||||
/// <param name="hostName">Host name.</param>
|
||||
/// <returns>AGB resource.</returns>
|
||||
public static string GetAGBResource(this string hostName)
|
||||
=> $"{hostName.GetSiteFolderName()}/{(hostName.GetIsCopri()? "konrad-TINK-AGB" : "agb.html")}";
|
||||
|
||||
/// <summary> Get the privacy resource name name depending on host name. </summary>
|
||||
/// <param name="hostName">Host name.</param>
|
||||
/// <returns>Privacy resource.</returns>
|
||||
public static string GetPrivacyResource(this string hostName)
|
||||
=> $"{hostName.GetSiteFolderName()}/{(hostName.GetIsCopri() ? "Datenschutz" : "privacy.html")}";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue