public RetroGamesViewModel(INavigationService navigationService, IRetroGamingService retroGamingService, ErrorEmulator errorEmulator)
            : base(navigationService)
        {
            _retroGamingService = retroGamingService;

            ErrorEmulatorViewModel = new ErrorEmulatorViewModel(errorEmulator, () => Loader.Load(InitializeAsync));

            // TaskStartMode = Auto
            // Loader = new TaskLoaderNotifier<List<Game>>(InitializeAsync);

            // TaskStartMode = Manual (Default mode)
            Loader = new TaskLoaderNotifier <List <Game> >();
        }
Пример #2
0
        public RetroGamesIsBusyViewModel(
            INavigationService navigationService,
            IRetroGamingService retroGamingService,
            ErrorEmulator errorEmulator)
            : base(navigationService)
        {
            _retroGamingService = retroGamingService;

            ErrorEmulatorViewModel = new ErrorEmulatorViewModel(errorEmulator, () => Load());

            RefreshCommand = new Command(() => Load(true));
            ReloadCommand  = new Command(() => Load());
        }