private void fromJSONArtistResults(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 ArtistResults of MusicSearchResultsJSON is not an array."); } int count1 = json_array1.componentCount(); if (count1 < 1) { throw new Exception("The value for field ArtistResults of MusicSearchResultsJSON has too few elements."); } List <MusicArtistResultJSON> vector_ArtistResults1 = new List <MusicArtistResultJSON>(count1); for (int num1 = 0; num1 < count1; ++num1) { MusicArtistResultJSON convert_classy = MusicArtistResultJSON.from_json(json_array1.component(num1), ignore_extras, true); vector_ArtistResults1.Add(convert_classy); } Debug.Assert(vector_ArtistResults1.Count >= 1); initArtistResults(); for (int num2 = 0; num2 < vector_ArtistResults1.Count; ++num2) { appendArtistResults(vector_ArtistResults1[num2]); } for (int num1 = 0; num1 < vector_ArtistResults1.Count; ++num1) { } }
protected override void finish() { MusicArtistResultJSON result = new MusicArtistResultJSON(); Debug.Assert(result != null); finish(result); handle_result(result); }
public void appendArtistResults(MusicArtistResultJSON to_append) { if (!flagHasArtistResults) { flagHasArtistResults = true; storeArtistResults.Clear(); } Debug.Assert(flagHasArtistResults); storeArtistResults.Add(to_append); }
protected void finish(MusicArtistResultJSON result) { if (fieldGeneratorArtistName.have_value) { result.setArtistName(fieldGeneratorArtistName.value); fieldGeneratorArtistName.have_value = false; } else if ((!(result.hasArtistName())) && !allow_incomplete) { error("When parsing the object for %what%, the \"ArtistName\" field was missing."); } if (fieldGeneratorSoundHoundId.have_value) { result.setSoundHoundId(fieldGeneratorSoundHoundId.value); fieldGeneratorSoundHoundId.have_value = false; } else if ((!(result.hasSoundHoundId())) && !allow_incomplete) { error("When parsing the object for %what%, the \"SoundHoundId\" field was missing."); } }
protected override void handle_result(MusicArtistResultJSON result) { top.value.Add(result); }
protected override void handle_result(MusicArtistResultJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(MusicArtistResultJSON new_result);