LearnLanguages.Study.ViewModels.StudyPhraseTimedQuestionAnswerViewModel.AskQuestionAsync C# (CSharp) Method

AskQuestionAsync() protected method

Executes callback when answer is shown, or when exception is thrown.
protected AskQuestionAsync ( PhraseEdit question, PhraseEdit answer, int questionDurationInMilliseconds ) : System.Threading.Tasks.Task
question PhraseEdit Question PhraseEdit
answer PhraseEdit Answer PhraseEdit
questionDurationInMilliseconds int
return System.Threading.Tasks.Task
    protected async Task AskQuestionAsync(PhraseEdit question,
                                          PhraseEdit answer,
                                          int questionDurationInMilliseconds)
    {
      HideAnswer();
      Question = question;
      Answer = answer;
      //WAIT IN THE BACKGROUND SO WE DON'T BLOCK OUR MAIN EXECUTION THREAD
      await CommonHelper.WaitAsync(questionDurationInMilliseconds);
      //Task waitTask = new Task(() => System.Threading.Thread.Sleep(questionDurationInMilliseconds));
      //waitTask.Start();
      //await waitTask;

    }