public QuestionViewModel Create(IModerator moderator, IQuestion question) { var answerViewModels = question.Answers .Select(text => CreateAnswerViewModel(text, moderator, question)).ToList(); return(new QuestionViewModel(question.Text, answerViewModels)); }
public void UpdateViewModel(QuestionViewModel questionViewModel, IModerator moderator, IQuestion question) { var answerViewModels = question.Answers .Select(text => CreateAnswerViewModel(text, moderator, question)); questionViewModel.Text = question.Text; questionViewModel.AnswerViewModels = answerViewModels; }
public void NewQuestion(IQuestion question, IModerator moderator) { var questionViewModel = _questionViewModel.Value; _questionViewModelFactory.UpdateViewModel(questionViewModel, moderator, question); ViewModel.Child = questionViewModel; }
public AnswerViewModel(string text, IQuestion question, IModerator moderator) { _question = question; _moderator = moderator; Text = text; AnswerCommand = new DelegateCommand(x => Answer(), x => CanExecuteAnswer()); }
public AnswerViewModel(string answer, IQuestion question, IModerator moderator) { Answer = answer; _question = question; _moderator = moderator; TappedCommand = new Command(x => SendAnswer(), x => CanExecuteAnswer()); }
public void NewQuestion(IQuestion question, IModerator moderator) { var viewModel = _questionViewModelFactory.Create(moderator, question); var page = new QuestionPage { BindingContext = viewModel }; _app.MainPage = page; }
public void NewQuestion(IQuestion question, IModerator moderator) { WriteTitle("Translate: " + question.Text); var answers = question.Answers.ToList(); for (int i = 0; i < answers.Count; i++) { var answer = answers[i]; Console.WriteLine(i + "\t" + answer); } var selectedIndex = GetSelectedIndex(answers.Count); moderator.Answer(question, answers[selectedIndex]); }
private static AnswerViewModel CreateAnswerViewModel(string text, IModerator moderator, IQuestion question) { return(new AnswerViewModel(text, question, moderator)); }
public PermissionService(IModerator moderator) { _moderator = moderator; }
public Aggregator(Configuration configuration, IModerator moderator) { _configuration = configuration; _moderator = moderator; }
public ModeratorModule(IModerator moderator) { _moderator = moderator; }
public ModeratorEMail(IModerator myModerator) { this.myModerator = myModerator; }
public ModeratorTelNumber(IModerator myModerator) { this.myModerator = myModerator; }
public ModeratorAdultContent(IModerator myModerator) { this.myModerator = myModerator; }