Пример #1
0
        public SillyPeopleVm(INavigationService navigationService, ISillyDudeService sillyDudeService, ErrorEmulator errorEmulator)
            : base(navigationService)
        {
            _sillyDudeService = sillyDudeService;
            InitCommands();

            ErrorEmulator             = new ErrorEmulatorVm(errorEmulator, () => SillyPeopleLoaderNotifier.Load(LoadSillyPeopleAsync));
            SillyPeopleLoaderNotifier = new TaskLoaderNotifier <ObservableCollection <SillyDudeVmo> >();
        }
        /// <summary>
        /// Loads the specified parameter.
        /// </summary>
        /// <param name="parameter">
        /// The parameter.
        /// </param>
        public override void Load(object parameter)
        {
            if (parameter is SortSillyPeopleVm)
            {
                // Coming from SortSillyPeopleVm
                return;
            }

            SillyPeopleLoaderNotifier.Load(LoadSillyPeopleAsync);
        }