Ejemplo n.º 1
0
        public void AddNewDataItem(int year, int month, int day, string brandName, int price)
        {
            CheckCacheException();
            var newItem = new FormatDataItem();

            newItem.SetDate(year, month, day);
            newItem.SetBrandName(brandName);
            newItem.SetPrice(price);
            _dataCollection.Add(newItem);
        }
Ejemplo n.º 2
0
        public void AddNewDataItem(string date, string brandName, int price)
        {
            CheckCacheException();
            var newItem = new FormatDataItem();

            newItem.SetDate(date);
            newItem.SetBrandName(brandName);
            newItem.SetPrice(price);
            _dataCollection.Add(newItem);
        }
Ejemplo n.º 3
0
 public FormatDataItem(FormatDataItem initialDataItem)
 {
     if (initialDataItem == null)
     {
         throw new ArgumentNullException("Initial data item for constructor is null");
     }
     SetDate(initialDataItem.Date);
     SetBrandName(initialDataItem.BrandName);
     SetPrice(initialDataItem.Price);
 }