protected void finish(ValidEmailJSON result) { if (fieldGeneratorContactName.have_value) { result.setContactName(fieldGeneratorContactName.value); fieldGeneratorContactName.have_value = false; } if (fieldGeneratorLabel.have_value) { result.setLabel(fieldGeneratorLabel.value); fieldGeneratorLabel.have_value = false; } if (fieldGeneratorContactID.have_value) { result.setContactID(fieldGeneratorContactID.value); fieldGeneratorContactID.have_value = false; } 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."); } }
private void fromJSONValidEmails(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 ValidEmails of EmailAddressFieldJSON is not an array."); } int count1 = json_array1.componentCount(); List <ValidEmailJSON> vector_ValidEmails1 = new List <ValidEmailJSON>(count1); for (int num1 = 0; num1 < count1; ++num1) { ValidEmailJSON convert_classy = ValidEmailJSON.from_json(json_array1.component(num1), ignore_extras, true); vector_ValidEmails1.Add(convert_classy); } initValidEmails(); for (int num3 = 0; num3 < vector_ValidEmails1.Count; ++num3) { appendValidEmails(vector_ValidEmails1[num3]); } for (int num1 = 0; num1 < vector_ValidEmails1.Count; ++num1) { } }
public void appendValidEmails(ValidEmailJSON to_append) { if (!flagHasValidEmails) { flagHasValidEmails = true; storeValidEmails.Clear(); } Debug.Assert(flagHasValidEmails); storeValidEmails.Add(to_append); }
protected override void finish() { ValidEmailJSON result = new ValidEmailJSON(); 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.extraValidEmailAppendPair(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(ValidEmailJSON result) { top.value.Add(result); }
protected override void handle_result(ValidEmailJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(ValidEmailJSON new_result);