private void fromJSONVideos(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 Videos of MusicChartsCommandNativeDataJSON is not an array."); } int count1 = json_array1.componentCount(); List <MusicVideoJSON> vector_Videos1 = new List <MusicVideoJSON>(count1); for (int num1 = 0; num1 < count1; ++num1) { MusicVideoJSON convert_classy = MusicVideoJSON.from_json(json_array1.component(num1), ignore_extras, true); vector_Videos1.Add(convert_classy); } initVideos(); for (int num1 = 0; num1 < vector_Videos1.Count; ++num1) { appendVideos(vector_Videos1[num1]); } for (int num1 = 0; num1 < vector_Videos1.Count; ++num1) { } }
protected override void finish() { MusicVideoJSON result = new MusicVideoJSON(); Debug.Assert(result != null); finish(result); handle_result(result); }
public void appendVideos(MusicVideoJSON to_append) { if (!flagHasVideos) { flagHasVideos = true; storeVideos.Clear(); } Debug.Assert(flagHasVideos); storeVideos.Add(to_append); }
protected void finish(MusicVideoJSON result) { if (fieldGeneratorVideoID.have_value) { result.setVideoID(fieldGeneratorVideoID.value); fieldGeneratorVideoID.have_value = false; } if (fieldGeneratorAutoPlayPreview.have_value) { result.setAutoPlayPreview(fieldGeneratorAutoPlayPreview.value); fieldGeneratorAutoPlayPreview.have_value = false; } if (fieldGeneratorTrack.have_value) { result.setTrack(fieldGeneratorTrack.value); fieldGeneratorTrack.have_value = false; } }
protected override void handle_result(MusicVideoJSON result) { top.value.Add(result); }
protected override void handle_result(MusicVideoJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(MusicVideoJSON new_result);