public MyTvShowsViewModel(IMyShowsApi myShowsApi)
        {
            this.myShowsApi = myShowsApi;
            Shows = new ObservableCollection<Shows>();

            myShowsApi.GetShows(
                result =>
                {
                    if (result.Status != System.Net.HttpStatusCode.OK)
                        Mvx.Resolve<IDialogService>().ShowMessage("Error", "Http status code not OK.");
                    else
                        Dispatcher.RequestMainThreadAction(() =>
                        {
                            Shows.AddRange(result.Response.Values);
                        });
                },
                error =>
                {
                    Mvx.Resolve<IDialogService>().ShowMessage("Error", error.Message);
                });
        }
Beispiel #2
0
 public Session(IDataManager dataManager, IMyShowsApi myShowsApi)
 {
     this.dataManager = dataManager;
     this.myShowsApi = myShowsApi;
 }
 public MyShowsApiFactory(ILogger logger, IHttpClientFactory httpClient)
 {
     _api20 = new MyShowsApi20(logger, httpClient);
 }
Beispiel #4
0
 public SignInViewModel(IMyShowsApi myShowsApi)
 {
     this.myShowsApi = myShowsApi;
 }