ImapClientPoolOptions

This commit is contained in:
Burak Kaan Köse
2024-09-29 21:21:51 +02:00
parent 92944c7adc
commit a8b19e73fe
4 changed files with 65 additions and 6 deletions

View File

@@ -0,0 +1,25 @@
using System.IO;
using Wino.Core.Domain.Entities;
namespace Wino.Core.Domain.Models.Connectivity
{
public class ImapClientPoolOptions
{
public Stream ProtocolLog { get; }
public CustomServerInformation ServerInformation { get; }
public bool IsTestPool { get; }
protected ImapClientPoolOptions(CustomServerInformation serverInformation, Stream protocolLog, bool isTestPool)
{
ServerInformation = serverInformation;
ProtocolLog = protocolLog;
IsTestPool = isTestPool;
}
public static ImapClientPoolOptions CreateDefault(CustomServerInformation serverInformation, Stream protocolLog)
=> new(serverInformation, protocolLog, false);
public static ImapClientPoolOptions CreateTestPool(CustomServerInformation serverInformation, Stream protocolLog)
=> new(serverInformation, protocolLog, true);
}
}