private void _questionRequest_AnswerReceived(object sender, QuestionResponseBto e) { QuestionResponseBto questResponse = new QuestionResponseBto() { SelectedAnswer = e.SelectedAnswer, StudentId = e.StudentId }; QuestionAnswerList.Add(questResponse); if (InvokeRequired) { Invoke((Action) delegate() { updateQuestionAnswerDashBoard(QuestionAnswerList); }); } else { updateQuestionAnswerDashBoard(QuestionAnswerList); } }
protected virtual void OnAnswerReceived(QuestionResponseBto answer) => AnswerReceived?.Invoke(this, answer);
/// <summary> /// Students uses this method to respond to Question requests /// </summary> /// <param name="responseBto"></param> public void SendQuestionResponse(QuestionResponseBto responseBto) { //Teacher App constantly monitor for this method for all the answers for the questions Clients.All.publishQuestionAnswer(responseBto); }
public async Task <bool> SendAsync(QuestionResponseBto responseBto) { await _hub.Invoke("SendQuestionResponse", responseBto); return(true); }