using System;
namespace TINK.Repository
{
///
/// Holds info passed to COPRI.
///
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));
}
/// Name of the app.
public string Name { get; private set; }
/// Version of the app.
public Version Version { get; private set; }
/// Merchang id of the app.
public string MerchantId { get; private set; }
/// Returns http- user agent.
public string UserAgent { get => $"{Name}/{Version}"; }
}
}