private void fromJSONMusicThirdPartyIds(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 MusicThirdPartyIds of MusicAlbumBaseJSON is not an array."); } int count1 = json_array1.componentCount(); if (count1 < 1) { throw new Exception("The value for field MusicThirdPartyIds of MusicAlbumBaseJSON has too few elements."); } List <MusicThirdPartyIdListJSON> vector_MusicThirdPartyIds1 = new List <MusicThirdPartyIdListJSON>(count1); for (int num1 = 0; num1 < count1; ++num1) { MusicThirdPartyIdListJSON convert_classy = MusicThirdPartyIdListJSON.from_json(json_array1.component(num1), ignore_extras, true); vector_MusicThirdPartyIds1.Add(convert_classy); } Debug.Assert(vector_MusicThirdPartyIds1.Count >= 1); initMusicThirdPartyIds(); for (int num2 = 0; num2 < vector_MusicThirdPartyIds1.Count; ++num2) { appendMusicThirdPartyIds(vector_MusicThirdPartyIds1[num2]); } for (int num1 = 0; num1 < vector_MusicThirdPartyIds1.Count; ++num1) { } }
protected override void finish() { MusicThirdPartyIdListJSON result = new MusicThirdPartyIdListJSON(); Debug.Assert(result != null); finish(result); handle_result(result); }
public void appendMusicThirdPartyIds(MusicThirdPartyIdListJSON to_append) { if (!flagHasMusicThirdPartyIds) { flagHasMusicThirdPartyIds = true; storeMusicThirdPartyIds.Clear(); } Debug.Assert(flagHasMusicThirdPartyIds); storeMusicThirdPartyIds.Add(to_append); }
protected void finish(MusicThirdPartyIdListJSON result) { if (fieldGeneratorMusicThirdParty.have_value) { result.setMusicThirdParty(fieldGeneratorMusicThirdParty.value); fieldGeneratorMusicThirdParty.have_value = false; } else if ((!(result.hasMusicThirdParty())) && !allow_incomplete) { error("When parsing the object for %what%, the \"MusicThirdParty\" field was missing."); } if (fieldGeneratorIds.have_value) { result.initIds(); int count = fieldGeneratorIds.value.Count; for (int num = 0; num < count; ++num) { result.appendIds(fieldGeneratorIds.value[num]); } fieldGeneratorIds.value.Clear(); fieldGeneratorIds.have_value = false; } else if ((!(result.hasIds())) && !allow_incomplete) { error("When parsing the object for %what%, the \"Ids\" field was missing."); } if (fieldGeneratorDeepLinks.have_value) { result.initDeepLinks(); int count = fieldGeneratorDeepLinks.value.Count; for (int num = 0; num < count; ++num) { result.appendDeepLinks(fieldGeneratorDeepLinks.value[num]); } fieldGeneratorDeepLinks.value.Clear(); fieldGeneratorDeepLinks.have_value = false; } else if ((!(result.hasDeepLinks())) && !allow_incomplete) { error("When parsing the object for %what%, the \"DeepLinks\" field was missing."); } }
protected override void handle_result(MusicThirdPartyIdListJSON result) { top.value.Add(result); }
protected override void handle_result(MusicThirdPartyIdListJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(MusicThirdPartyIdListJSON new_result);