Files
Cleanuparr/code/Common/Configuration/TransmissionConfig.cs
2024-11-19 13:46:40 +02:00

27 lines
525 B
C#

namespace Common.Configuration;
public record TransmissionConfig
{
public const string SectionName = "Transmission";
public required bool Enabled { get; init; }
public Uri? Url { get; init; }
public string? Username { get; init; }
public string? Password { get; init; }
public void Validate()
{
if (!Enabled)
{
return;
}
if (Url is null)
{
throw new ArgumentNullException(nameof(Url));
}
}
}