sharee.bike-App/LastenradBayern/ShareeBike.iOS/Device/AppInfo.cs

47 lines
1.3 KiB
C#
Raw Normal View History

2022-08-30 15:42:25 +02:00
using System;
using Foundation;
2024-04-09 12:53:23 +02:00
using ShareeBike.iOS.Device;
using ShareeBike.Model.Device;
2021-05-13 20:16:41 +02:00
using Xamarin.Forms;
[assembly: Dependency(typeof(AppInfo))]
2024-04-09 12:53:23 +02:00
namespace ShareeBike.iOS.Device
2021-05-13 20:16:41 +02:00
{
2024-04-09 12:53:23 +02:00
/// <summary> Holds information about the ShareeBike- app. </summary>
2022-09-06 16:08:19 +02:00
public class AppInfo : IAppInfo
{
/// <summary> Holds the the version of the app.</summary>
private static Version m_oVersion = null;
2021-05-13 20:16:41 +02:00
2022-09-06 16:08:19 +02:00
/// <summary> Constructs a app info object. </summary>
public AppInfo()
{
}
2021-05-13 20:16:41 +02:00
2022-09-06 16:08:19 +02:00
/// <summary> Constructs a app info object for initialization. </summary>
/// <param name="p_strVersionText"> Version to initializ object with.</param>
internal AppInfo(string p_strVersionText)
{
if (m_oVersion != null)
{
// Set version only once.
return;
}
2021-05-13 20:16:41 +02:00
2022-09-06 16:08:19 +02:00
if (!Version.TryParse(p_strVersionText, out Version l_oVersion))
{
m_oVersion = new Version(0, 8);
}
2021-05-13 20:16:41 +02:00
2022-09-06 16:08:19 +02:00
m_oVersion = l_oVersion;
}
2021-05-13 20:16:41 +02:00
2022-09-06 16:08:19 +02:00
/// <summary> Get the version of the app. </summary>
public Version Version => m_oVersion ?? new Version(0, 9);
2021-05-13 20:16:41 +02:00
2022-09-06 16:08:19 +02:00
/// <summary> Gets the URL to the app store. </summary>
2024-04-09 12:53:23 +02:00
/// <remarks> ShareeBike Url was @"http://itunes.apple.com/de/app/tink-konstanz/id1181519270?mt=8"</remarks>
2022-09-06 16:08:19 +02:00
/// <value>The store URL.</value>
public string StoreUrl => $"https://itunes.apple.com/de/app/apple-store/{NSBundle.MainBundle.BundleIdentifier}?mt=8";
}
2021-05-13 20:16:41 +02:00
}