示例#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");
        }
示例#2
0
 private void RaiseAnswerRemoved(Answer answer)
 {
     var handler = AnswerRemovedEvent;
     if (handler != null)
     {
         handler(this, new AnswersEventArgs(answer));
     }
 }
示例#3
0
        public AnswersEventArgs (Answer answer)
	    {
            _answer = answer;
	    }
示例#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);
 }