sharee.bike-App/TINKLib/Repository/AppContextInfo.cs
Anja Müller-Meißner 0468955d49 Version 3.0.338
2022-09-08 09:55:14 +02:00

35 lines
874 B
C#

using System;
namespace TINK.Repository
{
/// <summary>
/// Holds info passed to COPRI.
/// </summary>
public class AppContextInfo
{
public AppContextInfo(string merchantId, string name, Version version)
{
Name = !string.IsNullOrEmpty(name)
? name
: throw new ArgumentNullException(nameof(name));
Version = version;
MerchantId = !string.IsNullOrEmpty(merchantId)
? merchantId
: throw new ArgumentNullException(nameof(merchantId));
}
/// <summary> Name of the app. </summary>
public string Name { get; private set; }
/// <summary> Version of the app.</summary>
public Version Version { get; private set; }
/// <summary> Merchang id of the app. </summary>
public string MerchantId { get; private set; }
/// <summary> Returns http- user agent.</summary>
public string UserAgent { get => $"{Name}/{Version}"; }
}
}