Beispiel #1
0
 public override void VisitFieldValue(FieldValue fieldValue)
 {
     if (fieldValue.LabelId != null)
     {
         _columnNames.Add(fieldValue.LabelId);
         if (_currentRecord.ContainsKey(fieldValue.LabelId) && _currentRecord[fieldValue.LabelId] != null && _currentRecord[fieldValue.LabelId] != fieldValue.Text)
         {
             // TODO: Log or throw warning. The condition that fires this block means an existing value will be overwritten by the current value.
             // This means a subrecord should have been created before visiting the model. See VisitPerson() and VisitName() for examples
             // on creating a subrecord visit to prevent this problem.
         }
         _currentRecord[fieldValue.LabelId] = fieldValue.Text;
     }
     else
     {
         //todo: throw some error? log some warning?
     }
 }