/// <inheritdoc /> protected override async Task InitializeAsync() { await base.InitializeAsync().ConfigureAwait(true); // Get review collection _reviewCollection = _spacedRepetition.GetReviewCollection(_database); // Wait for initialization if (!_reviewCollection.Initialized.IsCompleted && !_reviewCollection.Initialized.Wait(100)) { _pleaseWaitService.Push(_languageService.GetString("SpacedRepetition_Review_Loading")); if (await _reviewCollection.Initialized.ConfigureAwait(true)) { DisplayCard(); } _pleaseWaitService.Pop(); } else if (_reviewCollection.Initialized.Result) { DisplayCard(); } }
private async Task <bool> OnContentChangeAsync() { MessageResult messageResult = await _messageService.ShowAsync( _languageService.GetString( "SpacedRepetition_Review_NavigateAwayPrompt"), string.Empty, MessageButton.YesNoCancel, MessageImage.Question) .ConfigureAwait(true); // Cancel review if (messageResult == MessageResult.No) { _reviewCollection = null; } return(messageResult != MessageResult.Cancel); }
public ReviewManager(IReviewCollection collection, IBeerCollection beerCollection) { Collection = collection; BeerCollection = beerCollection; }
public BeerManager(IBeerCollection collection, IReviewCollection reviewCollection) { Collection = collection; ReviewCollection = reviewCollection; }