public Reference <IQuestionOutputItem> Visit(Reference <IUserInputQuestionNode> node) { var domainItem = node.ToDomainItem(m_domainItemLocator); return(m_outputItemFactory.CreateQuestionOutputItem( domainItem.QuestionText, GetValue(node.Id), GetQuestionType(node.Id), m_questionsCurrentlyVisible, false)); }
private void Visit(DomainId <IUserInputQuestionNode> questionNode) { var astNode = questionNode.ToDomainItem(m_domainItemLocator); var existingOutput = m_domainItemLocator .GetAll <IQuestionOutputItem>() .FirstOrDefault(x => x.Variable.Id == astNode.Id); if (existingOutput == null) { var question = m_outputItemFactory.CreateQuestionOutputItem( new DomainId <IQuestionNode>(questionNode.Id), GetValue(astNode), m_questionsCurrentlyVisible.Peek(), false); m_questions.Add(question); } else { existingOutput.Visible = m_questionsCurrentlyVisible.Peek(); } }