2024-09-29 21:21:51 +02:00
|
|
|
|
using System.IO;
|
2024-11-10 23:28:25 +01:00
|
|
|
|
using Wino.Core.Domain.Entities.Shared;
|
2024-09-29 21:21:51 +02:00
|
|
|
|
|
2025-02-16 11:54:23 +01:00
|
|
|
|
namespace Wino.Core.Domain.Models.Connectivity;
|
|
|
|
|
|
|
|
|
|
|
|
public class ImapClientPoolOptions
|
2024-09-29 21:21:51 +02:00
|
|
|
|
{
|
2025-02-16 11:54:23 +01:00
|
|
|
|
public Stream ProtocolLog { get; }
|
|
|
|
|
|
public CustomServerInformation ServerInformation { get; }
|
|
|
|
|
|
public bool IsTestPool { get; }
|
2024-09-29 21:21:51 +02:00
|
|
|
|
|
2025-02-16 11:54:23 +01:00
|
|
|
|
protected ImapClientPoolOptions(CustomServerInformation serverInformation, Stream protocolLog, bool isTestPool)
|
|
|
|
|
|
{
|
|
|
|
|
|
ServerInformation = serverInformation;
|
|
|
|
|
|
ProtocolLog = protocolLog;
|
|
|
|
|
|
IsTestPool = isTestPool;
|
|
|
|
|
|
}
|
2024-09-29 21:21:51 +02:00
|
|
|
|
|
2025-02-16 11:54:23 +01:00
|
|
|
|
public static ImapClientPoolOptions CreateDefault(CustomServerInformation serverInformation, Stream protocolLog)
|
|
|
|
|
|
=> new(serverInformation, protocolLog, false);
|
2025-02-16 11:43:30 +01:00
|
|
|
|
|
2025-02-16 11:54:23 +01:00
|
|
|
|
public static ImapClientPoolOptions CreateTestPool(CustomServerInformation serverInformation, Stream protocolLog)
|
|
|
|
|
|
=> new(serverInformation, protocolLog, true);
|
2024-09-29 21:21:51 +02:00
|
|
|
|
}
|