public TranslateData(FibbaggeQuestionJSON aOrgQuestion, FibbaggeQuestionJSON aTranslatedQuestion) { FOrgQuestion = aOrgQuestion; if (aTranslatedQuestion == null) { FTranslatedQuestion = FOrgQuestion.CloneForTranslate(); FTranslatedQuestion.id = FOrgQuestion.id; } else { FTranslatedQuestion = aTranslatedQuestion; } }
public FibbaggeQuestionJSON CloneForTranslate() { var res = new FibbaggeQuestionJSON(); res.fields = new List <Field>(); for (int i = 0; i < fields.Count; i++) { var newField = new Field(); newField.n = fields[i].n; newField.t = fields[i].t; if (ShouldSkipEntry(i)) { newField.v = ""; } else { newField.v = fields[i].v; } res.fields.Add(newField); } return(res); }