protected void finish(UberTripEstimatesJSON result) { if (fieldGeneratorPriceEstimateRange.have_value) { result.setPriceEstimateRange(fieldGeneratorPriceEstimateRange.value); fieldGeneratorPriceEstimateRange.have_value = false; } else if ((!(result.hasPriceEstimateRange())) && !allow_incomplete) { error("When parsing the object for %what%, the \"PriceEstimateRange\" field was missing."); } if (fieldGeneratorLowPriceEstimate.have_value) { result.setLowPriceEstimateText(fieldGeneratorLowPriceEstimate.value); fieldGeneratorLowPriceEstimate.have_value = false; } if (fieldGeneratorHighPriceEstimate.have_value) { result.setHighPriceEstimateText(fieldGeneratorHighPriceEstimate.value); fieldGeneratorHighPriceEstimate.have_value = false; } if (fieldGeneratorCurrency.have_value) { result.setCurrency(fieldGeneratorCurrency.value); fieldGeneratorCurrency.have_value = false; } if (fieldGeneratorSurgeMultiplier.have_value) { result.setSurgeMultiplierText(fieldGeneratorSurgeMultiplier.value); fieldGeneratorSurgeMultiplier.have_value = false; } else if ((!(result.hasSurgeMultiplier())) && !allow_incomplete) { error("When parsing the object for %what%, the \"SurgeMultiplier\" field was missing."); } if (fieldGeneratorDurationEstimateInSeconds.have_value) { result.setDurationEstimateInSecondsText(fieldGeneratorDurationEstimateInSeconds.value); fieldGeneratorDurationEstimateInSeconds.have_value = false; } else if ((!(result.hasDurationEstimateInSeconds())) && !allow_incomplete) { error("When parsing the object for %what%, the \"DurationEstimateInSeconds\" field was missing."); } if (fieldGeneratorDistanceEstimateInMiles.have_value) { result.setDistanceEstimateInMilesText(fieldGeneratorDistanceEstimateInMiles.value); fieldGeneratorDistanceEstimateInMiles.have_value = false; } else if ((!(result.hasDistanceEstimateInMiles())) && !allow_incomplete) { error("When parsing the object for %what%, the \"DistanceEstimateInMiles\" field was missing."); } }
protected override void finish() { UberTripEstimatesJSON result = new UberTripEstimatesJSON(); 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.extraUberTripEstimatesAppendPair(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 abstract void handle_result(UberTripEstimatesJSON new_result);
protected override void handle_result(UberTripEstimatesJSON result) { top.value.Add(result); }
protected override void handle_result(UberTripEstimatesJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }