private List <Entry> TakeHomeSalesEntriesFromHomeSalesListPage(int page)
        {
            try
            {
                string  pageUrl = GeneratePageUrl(page);
                HtmlWeb htmlWeb = new HtmlWeb();

                HtmlDocument       homeSalesListHtmlDoc  = htmlWeb.Load(pageUrl);
                HtmlNodeCollection homeSalePageLinkNodes = TakeHomeSaleInfoLinkNodesFromHtmlDoc(homeSalesListHtmlDoc);

                List <Entry> homeSales = new List <Entry>();

                foreach (HtmlNode homeSalePageLinkNode in homeSalePageLinkNodes)
                {
                    string               homeSalePageUrl = GenerateHyperlinkNodeHref(homeSalePageLinkNode);
                    HtmlDocument         homeSaleHtmlDoc = htmlWeb.Load(homeSalePageUrl);
                    ZnajdzToHomeSalePage homeSalePage    = new ZnajdzToHomeSalePage(homeSaleHtmlDoc, homeSalePageUrl);
                    Entry homeSale = TakeHomeSaleEntryFromPage(homeSalePage);

                    homeSales.Add(homeSale);
                }

                return(homeSales);
            }
            catch
            {
                return(new List <Entry>());
            }
        }
 private PropertyPrice TakePropertyPriceFromPage(ZnajdzToHomeSalePage homeSalePage)
 {
     return(new PropertyPrice
     {
         PricePerMeter = homeSalePage.PricePerMeter,
         TotalGrossPrice = homeSalePage.TotalGrossPrice,
         ResidentalRent = homeSalePage.ResidentalRent
     });
 }
 private PropertyDetails TakePropertyDetailsFromPage(ZnajdzToHomeSalePage homeSalePage)
 {
     return(new PropertyDetails
     {
         Area = homeSalePage.Area,
         FloorNumber = homeSalePage.FloorNumber,
         NumberOfRooms = homeSalePage.NumberOfRooms,
         YearOfConstruction = homeSalePage.YearOfConstruction
     });
 }
 private PropertyAddress TakePropertyAddressFromPage(ZnajdzToHomeSalePage homeSalePage)
 {
     return(new PropertyAddress
     {
         City = homeSalePage.City,
         StreetName = homeSalePage.StreetName,
         DetailedAddress = homeSalePage.DetailedAddress,
         District = homeSalePage.District
     });
 }
 private PropertyFeatures TakePropertyFeaturesFromPage(ZnajdzToHomeSalePage homeSalePage)
 {
     return(new PropertyFeatures
     {
         Balconies = homeSalePage.Balconies,
         BasementArea = homeSalePage.BasementArea,
         GardenArea = homeSalePage.GardenArea,
         IndoorParkingPlaces = homeSalePage.IndoorParkingPlaces,
         OutdoorParkingPlaces = homeSalePage.OutdoorParkingPlaces
     });
 }
        private Entry TakeHomeSaleEntryFromPage(ZnajdzToHomeSalePage homeSalePage)
        {
            Entry entry = new Entry
            {
                OfferDetails     = TakeOfferDetailsFromPage(homeSalePage),
                PropertyAddress  = TakePropertyAddressFromPage(homeSalePage),
                PropertyDetails  = TakePropertyDetailsFromPage(homeSalePage),
                PropertyPrice    = TakePropertyPriceFromPage(homeSalePage),
                PropertyFeatures = TakePropertyFeaturesFromPage(homeSalePage),
                RawDescription   = homeSalePage.RawDescription
            };

            return(entry);
        }
 private OfferDetails TakeOfferDetailsFromPage(ZnajdzToHomeSalePage homeSalePage)
 {
     return(new OfferDetails
     {
         Url = homeSalePage.Url,
         CreationDateTime = homeSalePage.CreationDateTime,
         OfferKind = homeSalePage.OfferKind,
         SellerContact = new SellerContact
         {
             Email = homeSalePage.Email,
             Name = homeSalePage.Name,
             Telephone = homeSalePage.Telephone
         },
         IsStillValid = homeSalePage.IsStillValid
     });
 }