public ConnectionManager(Connection connection) { PendingMessages = new Queue <MessageAndCallback>(); AttemptsInfo = new ConnectionAttemptsInfo(connection); Connection = connection; AckProcessor = new AcknowledgementProcessor(connection); if (Logger.IsDebug) { Execute(() => Logger.Debug("ConnectionManager thread created")); } }
public ConnectionManager(Connection connection, Func <DateTimeOffset> nowFunc, ILogger logger) { Now = nowFunc; Logger = logger ?? DefaultLogger.LoggerInstance; PendingMessages = new Queue <MessageAndCallback>(); AttemptsInfo = new ConnectionAttemptsInfo(connection, nowFunc); Connection = connection; AckProcessor = new AcknowledgementProcessor(connection); if (Logger.IsDebug) { Execute(() => Logger.Debug("ConnectionManager thread created")); } }