protected override void finish() { UberRequestDriverJSON result = new UberRequestDriverJSON(); Debug.Assert(result != null); finish(result); int extra_count = unknownFieldGenerator.field_names.Count; Debug.Assert(extra_count == unknownFieldGenerator.field_values.Count); for (int extra_num = 0; extra_num < extra_count; ++extra_num) { result.extraUberRequestDriverAppendPair(unknownFieldGenerator.field_names[extra_num], unknownFieldGenerator.field_values[extra_num]); } unknownFieldGenerator.field_names.Clear(); unknownFieldGenerator.field_values.Clear(); unknownFieldGenerator.index = new Dictionary <string, JSONValue>(); handle_result(result); }
protected void finish(UberRequestDriverJSON result) { if (fieldGeneratorname.have_value) { result.setname(fieldGeneratorname.value); fieldGeneratorname.have_value = false; } else if ((!(result.hasname())) && !allow_incomplete) { error("When parsing the object for %what%, the \"name\" field was missing."); } if (fieldGeneratorphone_number.have_value) { result.setphone_number(fieldGeneratorphone_number.value); fieldGeneratorphone_number.have_value = false; } else if ((!(result.hasphone_number())) && !allow_incomplete) { error("When parsing the object for %what%, the \"phone_number\" field was missing."); } if (fieldGeneratorrating.have_value) { result.setratingText(fieldGeneratorrating.value); fieldGeneratorrating.have_value = false; } else if ((!(result.hasrating())) && !allow_incomplete) { error("When parsing the object for %what%, the \"rating\" field was missing."); } if (fieldGeneratorpicture_url.have_value) { result.setpicture_url(fieldGeneratorpicture_url.value.referenced()); fieldGeneratorpicture_url.have_value = false; } else if ((!(result.haspicture_url())) && !allow_incomplete) { error("When parsing the object for %what%, the \"picture_url\" field was missing."); } }
protected override void handle_result(UberRequestDriverJSON result) { top.value.Add(result); }
protected override void handle_result(UberRequestDriverJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(UberRequestDriverJSON new_result);