sharee.bike-App/TINKLib/Services/CopriApi/GeneralData.cs

38 lines
1.3 KiB
C#
Raw Normal View History

2022-01-04 18:54:03 +01:00
using System;
2022-01-22 18:28:01 +01:00
using TINK.Model;
2022-01-22 18:16:10 +01:00
using TINK.Model.Map;
2022-01-04 18:54:03 +01:00
namespace TINK.Services.CopriApi
{
/// <summary> Holds general purpose data returned from COPRI. </summary>
public class GeneralData
{
2022-01-22 18:16:10 +01:00
/// <summary> Constructs an empty general data object. </summary>
2022-01-22 18:28:01 +01:00
public GeneralData() : this(null, null, null, null) { }
2022-01-04 18:54:03 +01:00
2022-01-22 18:16:10 +01:00
public GeneralData(
IMapSpan initialMapSpan,
2022-08-30 15:42:25 +02:00
string merachantMessage,
2022-01-22 18:28:01 +01:00
Version apiVersion,
ResourceUrls resourceUrls)
2022-01-22 18:16:10 +01:00
{
InitialMapSpan = initialMapSpan ?? MapSpanFactory.Create();
2022-01-04 18:54:03 +01:00
MerchantMessage = merachantMessage ?? string.Empty;
ApiVersion = apiVersion ?? new Version(0, 0);
2022-01-22 18:28:01 +01:00
ResourceUrls = resourceUrls ?? new ResourceUrls();
2022-01-04 18:54:03 +01:00
}
2022-01-22 18:16:10 +01:00
/// <summary> Initial map display area.</summary>
public IMapSpan InitialMapSpan { get; private set; }
2022-01-04 18:54:03 +01:00
/// <summary> Message to be shown to user.</summary>
public string MerchantMessage { get; private set; }
/// <summary> Version of COPRI api. 0.0 if version is not set</summary>
public Version ApiVersion { get; private set; }
2022-01-22 18:28:01 +01:00
/// <summary> Resources (html pages) to be displayed provided by COPRI.</summary>
public IResourceUrls ResourceUrls { get; private set; }
2022-01-04 18:54:03 +01:00
}
}