From 8e397d811944f6c92919dd33e2919704099989c2 Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 2 Nov 2026 15:01:56 +0100 Subject: [PATCH] fix(options): relax EmailAccountsOptions properties from init-only to set init-only properties cannot be mutated by Options configure delegates. Switching to set allows the builder pattern to bind values post-construction. Also narrows Accounts type from IEnumerable to List for index access. --- .../Common/Options/EmailAccountsOptions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/DigitalData.MessagingService.Application/Common/Options/EmailAccountsOptions.cs b/src/core/DigitalData.MessagingService.Application/Common/Options/EmailAccountsOptions.cs index 5cdd25e..6a86720 100644 --- a/src/core/DigitalData.MessagingService.Application/Common/Options/EmailAccountsOptions.cs +++ b/src/core/DigitalData.MessagingService.Application/Common/Options/EmailAccountsOptions.cs @@ -17,18 +17,18 @@ public class EmailAccountsOptions /// /// The list of configured email accounts. /// - public required IEnumerable Accounts { get; init; } = []; + public required List Accounts { get; set; } = []; /// /// How often the IMAP sync worker polls for new emails, in seconds. /// Defaults to 300 seconds (5 minutes). /// - public int SyncIntervalSeconds { get; init; } = 300; + public int SyncIntervalSeconds { get; set; } = 300; /// /// The minimum interval, in seconds, between forced IMAP sync operations regardless of idle state. /// Defaults to 30 seconds (0.5 minute). /// - public int ForcedSyncIntervalSeconds { get; init; } = 30; + public int ForcedSyncIntervalSeconds { get; set; } = 30; } #endif \ No newline at end of file