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.
This commit is contained in:
@@ -17,18 +17,18 @@ public class EmailAccountsOptions
|
||||
/// <summary>
|
||||
/// The list of configured email accounts.
|
||||
/// </summary>
|
||||
public required IEnumerable<EmailAccountModificationDto> Accounts { get; init; } = [];
|
||||
public required List<EmailAccountModificationDto> Accounts { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// How often the IMAP sync worker polls for new emails, in seconds.
|
||||
/// Defaults to 300 seconds (5 minutes).
|
||||
/// </summary>
|
||||
public int SyncIntervalSeconds { get; init; } = 300;
|
||||
public int SyncIntervalSeconds { get; set; } = 300;
|
||||
|
||||
/// <summary>
|
||||
/// The minimum interval, in seconds, between forced IMAP sync operations regardless of idle state.
|
||||
/// Defaults to 30 seconds (0.5 minute).
|
||||
/// </summary>
|
||||
public int ForcedSyncIntervalSeconds { get; init; } = 30;
|
||||
public int ForcedSyncIntervalSeconds { get; set; } = 30;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user