54cabd98b4
* removed empty checks on qbit and deluge credentials * updated configuration readme
27 lines
506 B
C#
27 lines
506 B
C#
using System.Security;
|
|
|
|
namespace Common.Configuration;
|
|
|
|
public sealed record DelugeConfig : IConfig
|
|
{
|
|
public const string SectionName = "Deluge";
|
|
|
|
public required bool Enabled { get; init; }
|
|
|
|
public Uri? Url { get; init; }
|
|
|
|
public string? Password { get; init; }
|
|
|
|
public void Validate()
|
|
{
|
|
if (!Enabled)
|
|
{
|
|
return;
|
|
}
|
|
|
|
if (Url is null)
|
|
{
|
|
throw new ArgumentNullException(nameof(Url));
|
|
}
|
|
}
|
|
} |