public MainHostedService(ILogger <MainHostedService> logger, Dispatcher dispatcher, MailDispatcher mailDispatcher, ManagerMediator managerMediator, DBGrpcChannel dbGrpcChannel, DBMailQueueRepository dbMailQueueRepository) { _logger = logger; _dispatcher = dispatcher; _mailDispatcher = mailDispatcher; _managerMediator = managerMediator; _dbGrpcChannel = dbGrpcChannel; _dbMailQueueRepository = dbMailQueueRepository; }
public DBMailCallProxy(Mailer.MailerClient client, DBMailQueueRepository dbMailQueueRepository, DBMailQueueType type, ILogger logger) { _client = client; _dbMailQueueRepository = dbMailQueueRepository; _type = type; _logger = logger; _mailChannel = Channel.CreateUnbounded <MailPacket>(); var outgoMailQueue = _dbMailQueueRepository.GetOrAddOutgoMailQueue(_type); outgoMailQueue.OnRead += OnRead; EventCancelled += OnCancelled; }