private void fromJSONLastResultIdLists(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); MusicSearchResultsJSON convert_classy = MusicSearchResultsJSON.from_json(json_value, ignore_extras, true); setLastResultIdLists(convert_classy); }
public void setLastResultIdLists(MusicSearchResultsJSON new_value) { if (flagHasLastResultIdLists) { } flagHasLastResultIdLists = true; storeLastResultIdLists = new_value; }
protected override void finish() { MusicSearchResultsJSON result = new MusicSearchResultsJSON(); Debug.Assert(result != null); finish(result); handle_result(result); }
protected override void handle_result(MusicSearchResultsJSON result) { top.value.Add(result); }
protected override void handle_result(MusicSearchResultsJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(MusicSearchResultsJSON new_result);
protected void finish(MusicSearchResultsJSON result) { if (fieldGeneratorTrackResults.have_value) { result.initTrackResults(); int count = fieldGeneratorTrackResults.value.Count; for (int num = 0; num < count; ++num) { result.appendTrackResults(fieldGeneratorTrackResults.value[num]); } fieldGeneratorTrackResults.value.Clear(); fieldGeneratorTrackResults.have_value = false; } if (fieldGeneratorArtistResults.have_value) { result.initArtistResults(); int count = fieldGeneratorArtistResults.value.Count; for (int num = 0; num < count; ++num) { result.appendArtistResults(fieldGeneratorArtistResults.value[num]); } fieldGeneratorArtistResults.value.Clear(); fieldGeneratorArtistResults.have_value = false; } if (fieldGeneratorAlbumResults.have_value) { result.initAlbumResults(); int count = fieldGeneratorAlbumResults.value.Count; for (int num = 0; num < count; ++num) { result.appendAlbumResults(fieldGeneratorAlbumResults.value[num]); } fieldGeneratorAlbumResults.value.Clear(); fieldGeneratorAlbumResults.have_value = false; } if (fieldGeneratorLatestListType.have_value) { result.setLatestListType(fieldGeneratorLatestListType.value); fieldGeneratorLatestListType.have_value = false; } else if ((!(result.hasLatestListType())) && !allow_incomplete) { error("When parsing the object for %what%, the \"LatestListType\" field was missing."); } if (fieldGeneratorLastTrackListIndex.have_value) { result.setLastTrackListIndex(fieldGeneratorLastTrackListIndex.value); fieldGeneratorLastTrackListIndex.have_value = false; } else if ((!(result.hasLastTrackListIndex())) && !allow_incomplete) { error("When parsing the object for %what%, the \"LastTrackListIndex\" field was missing."); } if (fieldGeneratorLastArtistListIndex.have_value) { result.setLastArtistListIndex(fieldGeneratorLastArtistListIndex.value); fieldGeneratorLastArtistListIndex.have_value = false; } else if ((!(result.hasLastArtistListIndex())) && !allow_incomplete) { error("When parsing the object for %what%, the \"LastArtistListIndex\" field was missing."); } if (fieldGeneratorLastAlbumListIndex.have_value) { result.setLastAlbumListIndex(fieldGeneratorLastAlbumListIndex.value); fieldGeneratorLastAlbumListIndex.have_value = false; } else if ((!(result.hasLastAlbumListIndex())) && !allow_incomplete) { error("When parsing the object for %what%, the \"LastAlbumListIndex\" field was missing."); } }