Example #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]);
 }
Example #2
0
 public void AddEstate(IEstate estate)
 {
     if (estate == null)
     {
         throw new ArgumentNullException();
     }
     this.estates.Add(estate);
 }
Example #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);
        }
Example #5
0
 public Offer(OfferType initType, IEstate initEstate)
 {
     this.Type = initType;
     this.Estate = initEstate;
 }
Example #6
0
 public Rent(IEstate estate, decimal pricePerMonth)
     : base(OfferType.Rent, estate)
 {
     this.PricePerMonth = pricePerMonth;
 }
Example #7
0
 public RentOffer(OfferType type, IEstate estate,decimal Price):base(OfferType.Rent,estate)
 {
     this.PricePerMonth = Price;
 }
Example #8
0
 public EstateController()
 {
     Estate = new Estate();
 }
Example #9
0
 public SaleOffer(OfferType initType, IEstate initEstate, decimal price)
     : base(initType, initEstate)
 {
     this.Price = price;
 }
Example #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]);
 }
Example #12
0
 public SaleOffer(OfferType type, IEstate estate, decimal price) : base(OfferType.Sale, estate)
 {
     this.Price = price;
 }
Example #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);
 }
Example #15
0
 public CDCController()
 {
     CDC    = new CDC();
     Estate = new Estate();
 }
Example #16
0
 public Offer(OfferType type, IEstate estate)
 {
     this.Type = type;
     this.Estate = estate;
     
 }
Example #17
0
 public SaleOffer(IEstate estate = null, decimal price = 0M)
     : base(OfferType.Sale, estate)
 {
     this.price = price;
 }
Example #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);
 }
Example #20
0
 protected Offer(OfferType type, IEstate estate)
 {
     this.Type = type;
     this.Estate = estate;
 }
Example #21
0
 public Offer(OfferType type, IEstate estate)
 {
     this.Type   = type;
     this.Estate = estate;
 }
Example #22
0
 protected Offer(IEstate estate,decimal price)
 {
     this.Estate = estate;
     this.Price = price;
 }
Example #23
0
 public RentOffer(OfferType type, IEstate estate, decimal pricePerMonth)
     : base(type, estate)
 {
     this.PricePerMonth = pricePerMonth;
 }
Example #24
0
 public RentOffer(OfferType initType, IEstate initEstate, decimal pricePerMonth)
     : base(initType, initEstate)
 {
     this.PricePerMonth = pricePerMonth;
 }
Example #25
0
 public SaleOffer(OfferType type, IEstate estate, decimal price)
     : base(type, estate)
 {
     this.Price = price;
 }
Example #26
0
 public Offer(IEstate estate = null)
 {
     this.estate = estate;
 }