protected void finish(SunriseSunsetTimeInformationNuggetJSON result) { if (fieldGeneratorMapLocation.have_value) { result.setMapLocation(fieldGeneratorMapLocation.value); fieldGeneratorMapLocation.have_value = false; } else if ((!(result.hasMapLocation())) && !allow_incomplete) { error("When parsing the object for %what%, the \"MapLocation\" field was missing."); } if (fieldGeneratorRequestedType.have_value) { result.setRequestedType(fieldGeneratorRequestedType.value); fieldGeneratorRequestedType.have_value = false; } else if ((!(result.hasRequestedType())) && !allow_incomplete) { error("When parsing the object for %what%, the \"RequestedType\" field was missing."); } if (fieldGeneratorDateTimeRangeSpec.have_value) { result.setDateTimeRangeSpec(fieldGeneratorDateTimeRangeSpec.value); fieldGeneratorDateTimeRangeSpec.have_value = false; } else if ((!(result.hasDateTimeRangeSpec())) && !allow_incomplete) { error("When parsing the object for %what%, the \"DateTimeRangeSpec\" field was missing."); } if (fieldGeneratorRequestedInThePast.have_value) { result.setRequestedInThePast(fieldGeneratorRequestedInThePast.value); fieldGeneratorRequestedInThePast.have_value = false; } else if ((!(result.hasRequestedInThePast())) && !allow_incomplete) { error("When parsing the object for %what%, the \"RequestedInThePast\" field was missing."); } if (fieldGeneratorCalculatedDateAndTimes.have_value) { result.initCalculatedDateAndTimes(); int count = fieldGeneratorCalculatedDateAndTimes.value.Count; for (int num = 0; num < count; ++num) { result.appendCalculatedDateAndTimes(fieldGeneratorCalculatedDateAndTimes.value[num]); } fieldGeneratorCalculatedDateAndTimes.value.Clear(); fieldGeneratorCalculatedDateAndTimes.have_value = false; } else if ((!(result.hasCalculatedDateAndTimes())) && !allow_incomplete) { error("When parsing the object for %what%, the \"CalculatedDateAndTimes\" field was missing."); } base.finish(result); }
protected override void finish() { if (!(getDateAndTimeInformationNuggetJSONKey().Equals("SunriseSunsetTime"))) { throw new Exception("The key field has a value other than `SunriseSunsetTime'."); } SunriseSunsetTimeInformationNuggetJSON result = new SunriseSunsetTimeInformationNuggetJSON(); 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.extraSunriseSunsetTimeInformationNuggetAppendPair(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 override void handle_result(SunriseSunsetTimeInformationNuggetJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected override void handle_result(SunriseSunsetTimeInformationNuggetJSON result) { top.value.Add(result); }
protected abstract void handle_result(SunriseSunsetTimeInformationNuggetJSON new_result);