WatchThis.Controllers.SlideshowDriver.NextRandom C# (CSharp) Method

NextRandom() private method

private NextRandom ( ) : MediaItem
return WatchThis.Models.MediaItem
		private MediaItem NextRandom()
		{
			var index = _random.Next(Model.MediaList.Count);
			var item = Model.MediaList[index];
			Model.MediaList.RemoveAt(index);

			_recent.Add(item);
			while (_recent.Count > 1000)
			{
				_recent.RemoveAt(0);
			}

			return item;
		}