Пример #1
0
        /// <summary>
        /// Returns a specified count of random vehicles.
        /// </summary>
        /// <param name="count">number of vehicles to return</param>
        /// <returns></returns>
        public List <VehicleData> GetListOfVehicleData(int count)
        {
            var r          = new Range(0, _vehicleData.Count - 1);
            var returnList = new List <VehicleData>();
            var indexes    = _randomNumberGenerator.GetListOfNumbers(count, r);

            foreach (var index in indexes)
            {
                returnList.Add(_vehicleData[index]);
            }
            return(returnList);
        }
Пример #2
0
 public List <int> GetListOfNumbers(int size, Range range)
 {
     return(_randomNumberGenerator.GetListOfNumbers(size, range));
 }