public void CreateNewClient(MailBoxDto mailBox) { _logger.LogDebug("Adding client for Mail Box {id} ...", mailBox.Id); var client = new MailBoxClient(_clientLogger, mailBox, _mapper); AddClient(client); }
private void AddClient(MailBoxClient client) { _clients.Add(client.Identifier, client); _tasks.Add(client.Identifier, client.Run()); }