示例#1
0
 protected void finish(AreaCodeCityOfCodeInfoNuggetJSON result)
 {
     if (fieldGeneratorAreaCode.have_value)
     {
         result.setAreaCode(fieldGeneratorAreaCode.value);
         fieldGeneratorAreaCode.have_value = false;
     }
     else if ((!(result.hasAreaCode())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"AreaCode\" field was missing.");
     }
     if (fieldGeneratorCityName.have_value)
     {
         result.initCityName();
         int count = fieldGeneratorCityName.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendCityName(fieldGeneratorCityName.value[num]);
         }
         fieldGeneratorCityName.value.Clear();
         fieldGeneratorCityName.have_value = false;
     }
     base.finish(result);
 }