mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-03-02 05:18:13 -05:00
27 lines
525 B
C#
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));
|
|
}
|
|
}
|
|
} |