2024-11-26 15:14:31 +01:00
|
|
|
|
namespace AutoClient.Modes.FolderStore
|
|
|
|
|
|
{
|
|
|
|
|
|
public class PurchaseInfo
|
|
|
|
|
|
{
|
2024-11-27 13:43:38 +01:00
|
|
|
|
public PurchaseInfo(TimeSpan purchaseDurationTotal, TimeSpan purchaseDurationSafe)
|
|
|
|
|
|
{
|
|
|
|
|
|
PurchaseDurationTotal = purchaseDurationTotal;
|
|
|
|
|
|
PurchaseDurationSafe = purchaseDurationSafe;
|
|
|
|
|
|
|
|
|
|
|
|
if (PurchaseDurationTotal < TimeSpan.Zero) throw new Exception(nameof(PurchaseDurationTotal));
|
|
|
|
|
|
if (PurchaseDurationSafe < TimeSpan.Zero) throw new Exception(nameof(PurchaseDurationSafe));
|
|
|
|
|
|
if (PurchaseDurationTotal < PurchaseDurationSafe) throw new Exception("TotalDuration < SafeDuration");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public TimeSpan PurchaseDurationTotal { get; }
|
|
|
|
|
|
public TimeSpan PurchaseDurationSafe { get; }
|
2024-11-26 15:14:31 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|