//--- Constructors --- /// <summary> /// Constructor for creating an instance. /// </summary> /// <param name="client">ISqsClient instance.</param> /// <param name="queueName">Queue name.</param> /// <param name="timerFactory">TimerFactory instance.</param> public SqsQueueDelayedSendClient(ISqsClient client, SqsQueueName queueName, TaskTimerFactory timerFactory) { if (client == null) { throw new ArgumentNullException("client"); } this.QueueName = queueName; _client = client; _timedSendAccumulator = new TimedAccumulator <KeyValuePair <int, string> >(items => AsyncUtil.ForkBackgroundSender(() => BatchSendMessages(items)), SqsUtils.MAX_NUMBER_OF_BATCH_SEND_MESSAGES, AUTOFLUSH_TIME, timerFactory); }