public Task<TimeoutsChunk> GetNextChunk(DateTime startSlice) { ThrowExceptionUntilWaitTimeReached(); var timeoutsDue = new List<TimeoutsChunk.Timeout>(); foreach (var key in storage.Keys) { var value = storage[key]; if (value.Time <= startSlice) { var timeout = new TimeoutsChunk.Timeout(key, value.Time); timeoutsDue.Add(timeout); } } var chunk = new TimeoutsChunk(timeoutsDue.ToArray(), DateTime.UtcNow.AddSeconds(1)); return Task.FromResult(chunk); }
public Task <TimeoutsChunk> GetNextChunk(DateTime startSlice) { ThrowExceptionUntilWaitTimeReached(); var timeoutsDue = new List <TimeoutsChunk.Timeout>(); foreach (var key in storage.Keys) { var value = storage[key]; if (value.Time <= startSlice) { var timeout = new TimeoutsChunk.Timeout(key, value.Time); timeoutsDue.Add(timeout); } } var chunk = new TimeoutsChunk(timeoutsDue.ToArray(), DateTime.UtcNow.AddSeconds(1)); return(Task.FromResult(chunk)); }
public Task <TimeoutsChunk> GetNextChunk(DateTime startSlice) { var emptyChunk = new TimeoutsChunk(new TimeoutsChunk.Timeout[0], DateTime.UtcNow.AddYears(10)); return(Task.FromResult(emptyChunk)); }