mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-22 23:26:31 +01:00
35 lines
874 B
C#
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}"; }
|
|
}
|
|
}
|