private static List <BaseInputView> GetAllQuestions(this InputColumnView column, List <BaseInputView> allQuestions) { allQuestions = column.Rows.Aggregate(allQuestions, (list, next) => { return(next.GetAllQuestions(list)); }); return(column.Questions.Aggregate(allQuestions, (list, next) => { list.Add(next); return list; })); }
private static void UpdateAllQuestions(this InputColumnView column, Dictionary <int, object> values) { foreach (InputRowView row in column.Rows) { row.UpdateAllQuestions(values); } foreach (BaseInputView question in column.Questions) { if (values.TryGetValue(question.Id, out object @value)) { question.UpdateValue(@value); } } }