Esempio n. 1
0
        public static CoronavirusCountiresChartViewModel LoadViewModel(ICoronavirusCountryService coronavirusCountryService, Action <Task> onloaded = null)
        {
            CoronavirusCountiresChartViewModel viewModel = new CoronavirusCountiresChartViewModel(coronavirusCountryService);

            viewModel.Load().ContinueWith(t => onloaded?.Invoke(t));

            return(viewModel);
        }
Esempio n. 2
0
        public MainViewModel()
        {
            ICoronavirusCountryService coronavirusCountryService = new APICoronavirusCountryService();

            CoronavirusCountiresChartViewModel = CoronavirusCountiresChartViewModel.LoadViewModel(coronavirusCountryService);
        }