diff --git a/Apps/FailoverApp/Address.cs b/Apps/FailoverApp/Address.cs index 9057a5ba..5266b524 100644 --- a/Apps/FailoverApp/Address.cs +++ b/Apps/FailoverApp/Address.cs @@ -1,6 +1,6 @@ /* Technitium DNS Server -Copyright (C) 2023 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2024 Shreyas Zare (shreyas@technitium.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -37,7 +37,7 @@ namespace Failover Secondary = 2 } - public class Address : IDnsApplication, IDnsAppRecordRequestHandler + public sealed class Address : IDnsApplication, IDnsAppRecordRequestHandler { #region variables diff --git a/Apps/FailoverApp/CNAME.cs b/Apps/FailoverApp/CNAME.cs index e6fc8141..fb1e7513 100644 --- a/Apps/FailoverApp/CNAME.cs +++ b/Apps/FailoverApp/CNAME.cs @@ -1,6 +1,6 @@ /* Technitium DNS Server -Copyright (C) 2023 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2024 Shreyas Zare (shreyas@technitium.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ using TechnitiumLibrary.Net.Dns.ResourceRecords; namespace Failover { - public class CNAME : IDnsApplication, IDnsAppRecordRequestHandler + public sealed class CNAME : IDnsApplication, IDnsAppRecordRequestHandler { #region variables @@ -56,7 +56,7 @@ namespace Failover #region private - private IReadOnlyList GetAnswers(string domain, DnsQuestionRecord question, string zoneName, uint appRecordTtl, string healthCheck, Uri healthCheckUrl) + private DnsResourceRecord[] GetAnswers(string domain, DnsQuestionRecord question, string zoneName, uint appRecordTtl, string healthCheck, Uri healthCheckUrl) { HealthCheckResponse response = _healthService.QueryStatus(domain, question.Type, healthCheck, healthCheckUrl, true); switch (response.Status) diff --git a/Apps/FailoverApp/EmailAlert.cs b/Apps/FailoverApp/EmailAlert.cs index d45c8d56..fe0fa350 100644 --- a/Apps/FailoverApp/EmailAlert.cs +++ b/Apps/FailoverApp/EmailAlert.cs @@ -1,6 +1,6 @@ /* Technitium DNS Server -Copyright (C) 2022 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2024 Shreyas Zare (shreyas@technitium.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,7 +19,6 @@ along with this program. If not, see . using DnsServerCore.ApplicationCommon; using System; -using System.Collections.Generic; using System.Net; using System.Net.Mail; using System.Text; @@ -348,7 +347,7 @@ DNS Failover App public bool Enabled { get { return _enabled; } } - public IReadOnlyList AlertTo + public MailAddress[] AlertTo { get { return _alertTo; } } public string SmtpServer diff --git a/Apps/FailoverApp/HealthService.cs b/Apps/FailoverApp/HealthService.cs index dcc73c30..40c741b3 100644 --- a/Apps/FailoverApp/HealthService.cs +++ b/Apps/FailoverApp/HealthService.cs @@ -1,6 +1,6 @@ /* Technitium DNS Server -Copyright (C) 2023 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2024 Shreyas Zare (shreyas@technitium.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -420,16 +420,16 @@ namespace Failover #region properties - public IReadOnlyDictionary HealthChecks + public ConcurrentDictionary HealthChecks { get { return _healthChecks; } } - public IReadOnlyDictionary EmailAlerts + public ConcurrentDictionary EmailAlerts { get { return _emailAlerts; } } - public IReadOnlyDictionary WebHooks + public ConcurrentDictionary WebHooks { get { return _webHooks; } } - public IReadOnlyDictionary UnderMaintenance + public ConcurrentDictionary UnderMaintenance { get { return _underMaintenance; } } public IDnsServer DnsServer diff --git a/Apps/FailoverApp/WebHook.cs b/Apps/FailoverApp/WebHook.cs index ee2b8517..f19c1933 100644 --- a/Apps/FailoverApp/WebHook.cs +++ b/Apps/FailoverApp/WebHook.cs @@ -1,6 +1,6 @@ /* Technitium DNS Server -Copyright (C) 2023 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2024 Shreyas Zare (shreyas@technitium.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -330,7 +330,7 @@ namespace Failover public bool Enabled { get { return _enabled; } } - public IReadOnlyList Urls + public Uri[] Urls { get { return _urls; } } #endregion