public void GetAds() { var mth = new GetADs() { Type = AdTypes.MobileAdMiddle }; var datas = ApiClient.Instance.Value.Execute(mth).Result; }
private async Task LoadAds() { var mth = new GetADs() { AllowCache = true, Type = AdTypes.MobileAdMiddle }; var datas = await ApiClient.ApiClient.Instance.Value.GetDataFromCache(mth); if (datas == null) { datas = await ApiClient.ApiClient.Instance.Value.Execute(mth); } this.AdImgs = new ObservableCollection <Ad>(datas); this.NotifyOfPropertyChange(() => this.AdImgs); }