mirror of
https://github.com/codex-storage/cs-codex-dist-tests.git
synced 2025-02-23 01:08:34 +00:00
19 lines
753 B
C#
19 lines
753 B
C#
namespace AutoClient.Modes.FolderStore
|
|
{
|
|
public class PurchaseInfo
|
|
{
|
|
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; }
|
|
}
|
|
}
|