Esempio n. 1
0
        public AnswerViewModel(
            Answer answer, 
            IValidator<Answer> answerValidator,
            IValidator<AssociatedSubject> subjectValidator,
            ISubjectQuery subjectQuery,
            Guid busId)
        {
            _answer = answer;
            _busId = busId;

            _answerValidator = answerValidator;
            _subjectValidator = subjectValidator;
            _subjectQuery = subjectQuery;

            InitializeCommands();
            InitializeSubjects();

            _logger.Log(Level.Trace, "Created a new answer");
        }
Esempio n. 2
0
 private void RaiseAnswerRemoved(Answer answer)
 {
     var handler = AnswerRemovedEvent;
     if (handler != null)
     {
         handler(this, new AnswersEventArgs(answer));
     }
 }
Esempio n. 3
0
        public AnswersEventArgs (Answer answer)
	    {
            _answer = answer;
	    }
Esempio n. 4
0
 public RemoveAnswer(Question question, Answer answer)
 {
     _question = question;
     _answer = answer;
 }
 public void SaveAnswer(Guid choiceId)
 {
     Answer answer = new Answer(choiceId);
     Answers.Add(answer);
 }