示例#1
0
 private static void LoadEstateProperties(IEstate estate, string[] cmdArgs)
 {
     estate.Name        = cmdArgs[1];
     estate.Area        = double.Parse(cmdArgs[2]);
     estate.Location    = cmdArgs[3];
     estate.IsFurnished = bool.Parse(cmdArgs[4]);
 }
示例#2
0
 public void AddEstate(IEstate estate)
 {
     if (estate == null)
     {
         throw new ArgumentNullException();
     }
     this.estates.Add(estate);
 }
示例#3
0
 private void AddEstate(IEstate estate)
 {
     this.Estates.Add(estate);
     if (this.uniqueEstateNames.Contains(estate.Name))
     {
         throw new ArgumentException("Duplicated estate name: " + estate.Name);
     }
     this.uniqueEstateNames.Add(estate.Name);
 }
        public static IEstate CreateEstate(EstateType type)
        {
            IEstate estate = null;

            switch (type)
            {
            case EstateType.Apartment: estate = new Apartment(); break;

            case EstateType.Office: estate = new Office(); break;

            case EstateType.Garage: estate = new Garage(); break;

            case EstateType.House: estate = new House(); break;
            }

            return(estate);
        }
示例#5
0
 public Offer(OfferType initType, IEstate initEstate)
 {
     this.Type = initType;
     this.Estate = initEstate;
 }
示例#6
0
 public Rent(IEstate estate, decimal pricePerMonth)
     : base(OfferType.Rent, estate)
 {
     this.PricePerMonth = pricePerMonth;
 }
示例#7
0
 public RentOffer(OfferType type, IEstate estate,decimal Price):base(OfferType.Rent,estate)
 {
     this.PricePerMonth = Price;
 }
示例#8
0
 public EstateController()
 {
     Estate = new Estate();
 }
示例#9
0
 public SaleOffer(OfferType initType, IEstate initEstate, decimal price)
     : base(initType, initEstate)
 {
     this.Price = price;
 }
示例#10
0
 public RentOffer(IEstate estate = null, decimal pricePerMonth = 0M)
     : base(OfferType.Rent, estate)
 {
     this.pricePerMonth = pricePerMonth;
 }
 private static void LoadEstateProperties(IEstate estate, string[] cmdArgs)
 {
     estate.Name = cmdArgs[1];
     estate.Area = double.Parse(cmdArgs[2]);
     estate.Location = cmdArgs[3];
     estate.IsFurnished = bool.Parse(cmdArgs[4]);
 }
示例#12
0
 public SaleOffer(OfferType type, IEstate estate, decimal price) : base(OfferType.Sale, estate)
 {
     this.Price = price;
 }
示例#13
0
 public RentOffer(OfferType type, IEstate estate, decimal Price) : base(OfferType.Rent, estate)
 {
     this.PricePerMonth = Price;
 }
 //-------------------------------------------------------------------------------------[]
 private static void RegisterOwnership(IEstate golem)
 {
     OwnershipManager.Instance.RegisterOwnership(golem.Owner, golem);
 }
示例#15
0
 public CDCController()
 {
     CDC    = new CDC();
     Estate = new Estate();
 }
示例#16
0
文件: Offer.cs 项目: petar-rusev/OOP
 public Offer(OfferType type, IEstate estate)
 {
     this.Type = type;
     this.Estate = estate;
     
 }
示例#17
0
 public SaleOffer(IEstate estate = null, decimal price = 0M)
     : base(OfferType.Sale, estate)
 {
     this.price = price;
 }
示例#18
0
 public Sale(IEstate estate, decimal price)
     : base(OfferType.Sale, estate)
 {
     this.Price = price;
 }
 private void AddEstate(IEstate estate)
 {
     this.Estates.Add(estate);
     if (this.uniqueEstateNames.Contains(estate.Name))
     {
         throw new ArgumentException("Duplicated estate name: " + estate.Name);
     }
     this.uniqueEstateNames.Add(estate.Name);
 }
示例#20
0
 protected Offer(OfferType type, IEstate estate)
 {
     this.Type = type;
     this.Estate = estate;
 }
示例#21
0
文件: Offer.cs 项目: petar-rusev/OOP
 public Offer(OfferType type, IEstate estate)
 {
     this.Type   = type;
     this.Estate = estate;
 }
示例#22
0
 protected Offer(IEstate estate,decimal price)
 {
     this.Estate = estate;
     this.Price = price;
 }
示例#23
0
 public RentOffer(OfferType type, IEstate estate, decimal pricePerMonth)
     : base(type, estate)
 {
     this.PricePerMonth = pricePerMonth;
 }
示例#24
0
 public RentOffer(OfferType initType, IEstate initEstate, decimal pricePerMonth)
     : base(initType, initEstate)
 {
     this.PricePerMonth = pricePerMonth;
 }
示例#25
0
 public SaleOffer(OfferType type, IEstate estate, decimal price)
     : base(type, estate)
 {
     this.Price = price;
 }
示例#26
0
 public Offer(IEstate estate = null)
 {
     this.estate = estate;
 }