private void AddSample(int count) { lock (this.monitor) { var sample = new DownloadDataSample() { Count = count, Timestamp = DateTime.UtcNow }; this.samples.Add(sample); if (this.samples.Count > this.maxSampleCount) { this.samples.RemoveAt(0); } } }