protected void finish(DerivationJSON result) { if (fieldGeneratorSpokenForm.have_value) { result.setSpokenForm(fieldGeneratorSpokenForm.value); fieldGeneratorSpokenForm.have_value = false; } else if ((!(result.hasSpokenForm())) && (!allow_unpolished) && !allow_incomplete) { error("When parsing the object for %what%, the \"SpokenForm\" field was missing."); } if (fieldGeneratorWrittenForm.have_value) { result.setWrittenForm(fieldGeneratorWrittenForm.value); fieldGeneratorWrittenForm.have_value = false; } else if ((!(result.hasWrittenForm())) && (!allow_unpolished) && !allow_incomplete) { error("When parsing the object for %what%, the \"WrittenForm\" field was missing."); } if (fieldGeneratorSpokenFormSSML.have_value) { result.setSpokenFormSSML(fieldGeneratorSpokenFormSSML.value); fieldGeneratorSpokenFormSSML.have_value = false; } }
private void fromJSONNumberDerivation(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); DerivationJSON convert_classy = DerivationJSON.from_json(json_value, ignore_extras, true); setNumberDerivation(convert_classy); }
protected override void finish() { if (!(keyGenerator.have_value)) { throw new Exception("The `DerivationKind' field is missing."); } DerivationJSON result = createForKey(keyGenerator.value, unknownFieldGenerator.index); 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.extraDerivationAppendPair(unknownFieldGenerator.field_names[extra_num], unknownFieldGenerator.field_values[extra_num]); } unknownFieldGenerator.field_names.Clear(); unknownFieldGenerator.field_values.Clear(); unknownFieldGenerator.index = new Dictionary <string, JSONValue>(); if (!allow_incomplete) { string missing_field_error = result.missing_field_error(allow_unpolished); if (missing_field_error != null) { error(missing_field_error); } } handle_result(result); }
public void setNumberDerivation(DerivationJSON new_value) { if (flagHasNumberDerivation) { } flagHasNumberDerivation = true; storeNumberDerivation = new_value; }
public void setDerivation(DerivationJSON new_value) { if (flagHasDerivation) { } flagHasDerivation = true; storeDerivation = new_value; }
protected override void handle_result(DerivationJSON new_result) { handle_result((ImplicitPropertyOfJSON )new_result); }
protected override void handle_result(DerivationJSON new_result) { handle_result((ExplicitlyNamedDerivationJSON )new_result); }
protected override void handle_result(DerivationJSON new_result) { handle_result((ExplicitPhoneNumberDerivationJSON )new_result); }
protected override void handle_result(DerivationJSON result) { top.value.Add(result); }
protected override void handle_result(DerivationJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(DerivationJSON new_result);