Exemple #1
0
        public bool TriggerEnrollment(TriggerEnrollmentRequest request)
        {
            if (!_mirrorStateServices.GetCurrentUser().IsDefaultUser)
            {
                return(false);
            }

            _voiceUseCasesStateService.SetCurrentDetectionState(VoiceUseCasesState.EnrollmentDetection);
            _voiceUseCasesStateService.SetUserForEnrollment(request.SnowUser);
            _mirrorStateServices.SetCurrentUserTO(new MirrorUser(request.SnowUser, false, false, null));
            _deliveryBoundary.DeliverEnrollmentPage();
            return(true);
        }
        public async void TriggerDefaultUser()
        {
            // warum?!
            //var weatherdata = await _weatherService.LoadWeatherData("Karlsruhe");
            var weather = await _weatherService.GetWeather("Karlsruhe");

            var newsSources = await _newsService.GetSources();

            var news = await _newsService.GetNews(newsSources);

            _defaultUserPresenter.OnPresent(new DwarfData(null, news));
            await _deliveryBoundary.DeliverDefaultUserPage().ConfigureAwait(false);

            _mirrorStateServices.SetCurrentUserTO(_mirrorStateServices.LoadDefaultUser());
        }