Example #1
0
        public Sale(string name, Lot lot, Seller seller, double startPrice, 
            double increment, TimeSpan duration, Category category)
        {
            Name = name;
            Number = 0;
            Lot = lot;
            StartTime = DateTime.Now;
            _bids = new List<Bid>();
            StartPrice = startPrice;
            Increment = increment;
            Seller = seller;

            if (duration < TimeSpan.FromMinutes(1))
            {
                duration = TimeSpan.FromSeconds(1); //исправить! FromMinutes(1)
            }
            Duration = duration;
            Category = category;
        }
Example #2
0
 public void AddSeller(Seller seller)
 {
     if (_sellers.Count(s => s.Login == seller.Login) == 0)
         _sellers.Add(seller);
     else
         throw new DuplicateNameException("login is not available");
 }