private void fromJSONSMS(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); SMSJSON convert_classy = SMSJSON.from_json(json_value, ignore_extras, true); setSMS(convert_classy); }
protected void finish(SMSJSON result) { if (fieldGeneratorRecipients.have_value) { result.initRecipients(); int count = fieldGeneratorRecipients.value.Count; for (int num = 0; num < count; ++num) { result.appendRecipients(fieldGeneratorRecipients.value[num]); } fieldGeneratorRecipients.value.Clear(); fieldGeneratorRecipients.have_value = false; } if (fieldGeneratorSpokenBody.have_value) { result.setSpokenBody(fieldGeneratorSpokenBody.value); fieldGeneratorSpokenBody.have_value = false; } if (fieldGeneratorWrittenBody.have_value) { result.setWrittenBody(fieldGeneratorWrittenBody.value); fieldGeneratorWrittenBody.have_value = false; } if (fieldGeneratorBody.have_value) { result.setBody(fieldGeneratorBody.value); fieldGeneratorBody.have_value = false; } if (fieldGeneratorTo.have_value) { result.setTo(fieldGeneratorTo.value); fieldGeneratorTo.have_value = false; } }
public void setSMS(SMSJSON new_value) { if (flagHasSMS) { } flagHasSMS = true; storeSMS = new_value; }
protected override void finish() { SMSJSON result = new SMSJSON(); 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.extraSMSAppendPair(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(SMSJSON result) { top.value.Add(result); }
protected override void handle_result(SMSJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(SMSJSON new_result);