예제 #1
0
        public int GetHashCode([DisallowNull] Entry obj)
        {
            var hashBuilder = new HashBuilder();

            hashBuilder.AddProperty(obj.PropertyAddress.City);
            hashBuilder.AddProperty(obj.OfferDetails.OfferKind);
            hashBuilder.AddProperty(obj.PropertyDetails.Area);
            hashBuilder.AddProperty(obj.PropertyDetails.NumberOfRooms);
            hashBuilder.AddProperty(obj.PropertyAddress.District);
            hashBuilder.AddProperty(obj.PropertyAddress.StreetName);
            hashBuilder.AddProperty(obj.PropertyAddress.DetailedAddress);
            hashBuilder.AddProperty(obj.OfferDetails.SellerContact);
            hashBuilder.AddProperty(obj.PropertyDetails.FloorNumber);
            hashBuilder.AddProperty(obj.PropertyDetails.YearOfConstruction);
            hashBuilder.AddProperty(obj.PropertyFeatures.Balconies);
            hashBuilder.AddProperty(obj.PropertyFeatures.BasementArea);
            hashBuilder.AddProperty(obj.PropertyFeatures.GardenArea);
            hashBuilder.AddProperty(obj.PropertyFeatures.IndoorParkingPlaces);
            hashBuilder.AddProperty(obj.PropertyFeatures.OutdoorParkingPlaces);

            return(hashBuilder.Hash);
        }