コード例 #1
0
        /// <summary>
        /// Froms the year and plate.
        /// </summary>
        /// <param name="year">The year plate year.</param>
        /// <param name="plate">The plate.</param>
        /// <returns>The year plate</returns>
        public IYearPlate FromYearAndPlate(int year, string plate)
        {
            IYearPlate result = null;

            if (yearPlates == null)
            {
                Populate();
            }

            IEnumerable <YearPlate> candidates = yearPlates.Where(item => item != null);

            result = candidates.FirstOrDefault(item => item.Year == year && item.Plate == plate);

            return(result);
        }
コード例 #2
0
 /// <summary>
 /// Gets the year plate range.
 /// </summary>
 /// <param name="plateFrom">The plate from.</param>
 /// <param name="plateTo">The plate to.</param>
 /// <returns>List of year plates</returns>
 public List <IYearPlate> GetRange(IYearPlate plateFrom, IYearPlate plateTo)
 {
     return(this.GetRange(plateFrom.Id, plateTo.Id));
 }