private void fromJSONDisambiguationCandidates(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); JSONArrayValue json_array1 = json_value.array_value(); if (json_array1 == null) { throw new Exception("The value for field DisambiguationCandidates of DisambiguatePhoneNumberJSON is not an array."); } int count1 = json_array1.componentCount(); List <PhoneNumberDisambiguationCandidateJSON> vector_DisambiguationCandidates1 = new List <PhoneNumberDisambiguationCandidateJSON>(count1); for (int num1 = 0; num1 < count1; ++num1) { PhoneNumberDisambiguationCandidateJSON convert_classy = PhoneNumberDisambiguationCandidateJSON.from_json(json_array1.component(num1), ignore_extras, true); vector_DisambiguationCandidates1.Add(convert_classy); } initDisambiguationCandidates(); for (int num1 = 0; num1 < vector_DisambiguationCandidates1.Count; ++num1) { appendDisambiguationCandidates(vector_DisambiguationCandidates1[num1]); } for (int num1 = 0; num1 < vector_DisambiguationCandidates1.Count; ++num1) { } }
protected override void finish() { PhoneNumberDisambiguationCandidateJSON result = new PhoneNumberDisambiguationCandidateJSON(); Debug.Assert(result != null); finish(result); handle_result(result); }
public void appendDisambiguationCandidates(PhoneNumberDisambiguationCandidateJSON to_append) { if (!flagHasDisambiguationCandidates) { flagHasDisambiguationCandidates = true; storeDisambiguationCandidates.Clear(); } Debug.Assert(flagHasDisambiguationCandidates); storeDisambiguationCandidates.Add(to_append); }
protected void finish(PhoneNumberDisambiguationCandidateJSON result) { if (fieldGeneratorContactName.have_value) { result.setContactName(fieldGeneratorContactName.value); fieldGeneratorContactName.have_value = false; } else if ((!(result.hasContactName())) && !allow_incomplete) { error("When parsing the object for %what%, the \"ContactName\" field was missing."); } if (fieldGeneratorContactID.have_value) { result.setContactID(fieldGeneratorContactID.value); fieldGeneratorContactID.have_value = false; } else if ((!(result.hasContactID())) && !allow_incomplete) { error("When parsing the object for %what%, the \"ContactID\" field was missing."); } if (fieldGeneratorPhoneNumbers.have_value) { result.initPhoneNumbers(); int count = fieldGeneratorPhoneNumbers.value.Count; for (int num = 0; num < count; ++num) { result.appendPhoneNumbers(fieldGeneratorPhoneNumbers.value[num]); } fieldGeneratorPhoneNumbers.value.Clear(); fieldGeneratorPhoneNumbers.have_value = false; } else if ((!(result.hasPhoneNumbers())) && !allow_incomplete) { error("When parsing the object for %what%, the \"PhoneNumbers\" field was missing."); } }
protected override void handle_result(PhoneNumberDisambiguationCandidateJSON result) { top.value.Add(result); }
protected override void handle_result(PhoneNumberDisambiguationCandidateJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(PhoneNumberDisambiguationCandidateJSON new_result);