private void fromJSONDateTimeRangeSpec(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); DateTimeRangeSpecJSON convert_classy = DateTimeRangeSpecJSON.from_json(json_value, ignore_extras, true); setDateTimeRangeSpec(convert_classy); }
public void setDepartureDateTimeRange(DateTimeRangeSpecJSON new_value) { if (flagHasDepartureDateTimeRange) { } flagHasDepartureDateTimeRange = true; storeDepartureDateTimeRange = new_value; }
public void setDateTimeRangeSpec(DateTimeRangeSpecJSON new_value) { if (flagHasDateTimeRangeSpec) { } flagHasDateTimeRangeSpec = true; storeDateTimeRangeSpec = new_value; }
protected void finish(DateTimeRangeSpecJSON result) { if (fieldGeneratorStartDateTimeSpec.have_value) { result.setStartDateTimeSpec(fieldGeneratorStartDateTimeSpec.value); fieldGeneratorStartDateTimeSpec.have_value = false; } else if ((!(result.hasStartDateTimeSpec())) && !allow_incomplete) { error("When parsing the object for %what%, the \"StartDateTimeSpec\" field was missing."); } if (fieldGeneratorEndDateTimeSpec.have_value) { result.setEndDateTimeSpec(fieldGeneratorEndDateTimeSpec.value); fieldGeneratorEndDateTimeSpec.have_value = false; } else if ((!(result.hasEndDateTimeSpec())) && !allow_incomplete) { error("When parsing the object for %what%, the \"EndDateTimeSpec\" field was missing."); } if (fieldGeneratorStartDateTimeInferred.have_value) { result.setStartDateTimeInferred(fieldGeneratorStartDateTimeInferred.value); fieldGeneratorStartDateTimeInferred.have_value = false; } else if ((!(result.hasStartDateTimeInferred())) && !allow_incomplete) { error("When parsing the object for %what%, the \"StartDateTimeInferred\" field was missing."); } if (fieldGeneratorEndDateTimeInferred.have_value) { result.setEndDateTimeInferred(fieldGeneratorEndDateTimeInferred.value); fieldGeneratorEndDateTimeInferred.have_value = false; } else if ((!(result.hasEndDateTimeInferred())) && !allow_incomplete) { error("When parsing the object for %what%, the \"EndDateTimeInferred\" field was missing."); } if (fieldGeneratorRangeIsExplicit.have_value) { result.setRangeIsExplicit(fieldGeneratorRangeIsExplicit.value); fieldGeneratorRangeIsExplicit.have_value = false; } else if ((!(result.hasRangeIsExplicit())) && !allow_incomplete) { error("When parsing the object for %what%, the \"RangeIsExplicit\" field was missing."); } if (fieldGeneratorExpressedAsDuration.have_value) { result.setExpressedAsDuration(fieldGeneratorExpressedAsDuration.value); fieldGeneratorExpressedAsDuration.have_value = false; } else if ((!(result.hasExpressedAsDuration())) && !allow_incomplete) { error("When parsing the object for %what%, the \"ExpressedAsDuration\" field was missing."); } }
protected override void finish() { DateTimeRangeSpecJSON result = new DateTimeRangeSpecJSON(); 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.extraDateTimeRangeSpecAppendPair(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(DateTimeRangeSpecJSON result) { top.value.Add(result); }
protected override void handle_result(DateTimeRangeSpecJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(DateTimeRangeSpecJSON new_result);