public void Clear() { //daoFactories = null; Daos?.Clear(); AdditionalData?.Clear(); }
void CopyAdverToViewModel(Advert advert) { AdverIDinRzeszowiak = advert?.AdverIDinRzeszowiak ?? 0; Title = advert?.Title ?? String.Empty; Price = advert?.Price ?? 0; Views = advert?.Views ?? 0; DescriptionHTML = advert?.DescriptionHTML ?? String.Empty; DateAdd = advert?.DateAddString ?? String.Empty; ExpiredDateAdd = advert?.ExpiredString ?? String.Empty; Highlighted = advert?.Highlighted ?? false; AdditionalData.Clear(); foreach (var item in advert?.AdditionalData) { AdditionalData.Add(new KeyValue(item.Key, item.Value)); } ImageURLsList.Clear(); if (advert?.ImageURLsList != null) { foreach (var item in advert?.ImageURLsList) { ImageURLsList.Add(item); } } if ((advert.PhoneSsid.Length == 10 && advert.PhonePHPSSESION != null) || advert?.PhoneImageByteArray?.Length > 0) { HasPhoneImage = true; _imageContainer.HideImage(); _imageContainer.DownloadImage(advert, advert.PhoneSsid, advert.AdverIDinRzeszowiak, advert.URLPath, advert.PhonePHPSSESION); // no wait } else { HasPhoneImage = false; } _lastAdvert = advert; }