コード例 #1
0
 protected void finish(WhoJSON result)
 {
     if (fieldGeneratorFullName.have_value)
     {
         result.setFullName(fieldGeneratorFullName.value);
         fieldGeneratorFullName.have_value = false;
     }
     if (fieldGeneratorSpokenName.have_value)
     {
         result.setSpokenName(fieldGeneratorSpokenName.value);
         fieldGeneratorSpokenName.have_value = false;
     }
     if (fieldGeneratorFullNamePronunciation.have_value)
     {
         result.setFullNamePronunciation(fieldGeneratorFullNamePronunciation.value);
         fieldGeneratorFullNamePronunciation.have_value = false;
     }
     if (fieldGeneratorAliases.have_value)
     {
         result.initAliases();
         int count = fieldGeneratorAliases.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendAliases(fieldGeneratorAliases.value[num]);
         }
         fieldGeneratorAliases.value.Clear();
         fieldGeneratorAliases.have_value = false;
     }
     if (fieldGeneratorAliasPronunciations.have_value)
     {
         result.initAliasPronunciations();
         int count = fieldGeneratorAliasPronunciations.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendAliasPronunciations(fieldGeneratorAliasPronunciations.value[num]);
         }
         fieldGeneratorAliasPronunciations.value.Clear();
         fieldGeneratorAliasPronunciations.have_value = false;
     }
     if (fieldGeneratorFirstName.have_value)
     {
         result.setFirstName(fieldGeneratorFirstName.value);
         fieldGeneratorFirstName.have_value = false;
     }
     if (fieldGeneratorLastName.have_value)
     {
         result.setLastName(fieldGeneratorLastName.value);
         fieldGeneratorLastName.have_value = false;
     }
     if (fieldGeneratorReferredToAs.have_value)
     {
         result.setReferredToAs(fieldGeneratorReferredToAs.value);
         fieldGeneratorReferredToAs.have_value = false;
     }
     if (fieldGeneratorSex.have_value)
     {
         result.setSex(fieldGeneratorSex.value);
         fieldGeneratorSex.have_value = false;
     }
     if (fieldGeneratorBirthday.have_value)
     {
         result.setBirthday(fieldGeneratorBirthday.value);
         fieldGeneratorBirthday.have_value = false;
     }
     if (fieldGeneratorWikipediaArticleTitle.have_value)
     {
         result.setWikipediaArticleTitle(fieldGeneratorWikipediaArticleTitle.value);
         fieldGeneratorWikipediaArticleTitle.have_value = false;
     }
 }