public Task <HttpGetIksSuccessResult> ExecuteAsync(DateTime date, string batchTag = null)
        {
            HttpGetIksSuccessResult result = null;
            var dateString = date.ToString(DateFormatString);

            //TODO: If batchTag is null, return the first batch from date; otherwise get the batch matching batchTag

            if (_callIndexes.ContainsKey(dateString) && _callIndexes[dateString] < _responses[dateString].Count)
            {
                result = _responses[dateString][_callIndexes[dateString]++];
            }

            return(Task.FromResult(result));
        }
        public void AddItem(HttpGetIksSuccessResult item, DateTime date)
        {
            var dateString = date.ToString(DateFormatString);

            if (!_Responses.ContainsKey(dateString))
            {
                _Responses[dateString]   = new List <HttpGetIksSuccessResult>();
                _CallIndexes[dateString] = 0;
            }

            var dateResponses = _Responses[dateString];

            if (dateResponses.Count > 0)
            {
                dateResponses.Last().NextBatchTag = item.BatchTag;
            }

            dateResponses.Add(item);
        }
 public void AddItem(HttpGetIksSuccessResult item)
 {
     AddItem(item, DateTime.Now);
 }