private void fromJSONEmails(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 Emails of EmailDisambiguationCandidateJSON is not an array."); } int count1 = json_array1.componentCount(); List <TypeEmailsJSON> vector_Emails1 = new List <TypeEmailsJSON>(count1); for (int num1 = 0; num1 < count1; ++num1) { TypeEmailsJSON convert_classy = TypeEmailsJSON.from_json(json_array1.component(num1), ignore_extras, true); vector_Emails1.Add(convert_classy); } initEmails(); for (int num1 = 0; num1 < vector_Emails1.Count; ++num1) { appendEmails(vector_Emails1[num1]); } for (int num1 = 0; num1 < vector_Emails1.Count; ++num1) { } }
protected override void finish() { TypeEmailsJSON result = new TypeEmailsJSON(); Debug.Assert(result != null); finish(result); handle_result(result); }
public void appendEmails(TypeEmailsJSON to_append) { if (!flagHasEmails) { flagHasEmails = true; storeEmails.Clear(); } Debug.Assert(flagHasEmails); storeEmails.Add(to_append); }
protected void finish(TypeEmailsJSON result) { if (fieldGeneratorLabel.have_value) { result.setLabel(fieldGeneratorLabel.value); fieldGeneratorLabel.have_value = false; } else if ((!(result.hasLabel())) && !allow_incomplete) { error("When parsing the object for %what%, the \"Label\" field was missing."); } if (fieldGeneratorEmail.have_value) { result.setEmail(fieldGeneratorEmail.value); fieldGeneratorEmail.have_value = false; } else if ((!(result.hasEmail())) && !allow_incomplete) { error("When parsing the object for %what%, the \"Email\" field was missing."); } }
protected override void handle_result(TypeEmailsJSON result) { top.value.Add(result); }
protected override void handle_result(TypeEmailsJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(TypeEmailsJSON new_result);